Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PHP 8.2 from march 27, 2023 and symfony 6.2 project when running phpspec 7.3.0 on ci step i get followin error at ArrayAcces::offsetExists() #1445

@MKalat

Description

@MKalat

vendor/bin/phpspec run -c phpspec.yml --format=tap

 

TAP version 13

 

Fatal error happened while executing the following

 

    it is initializable

 

    During inheritance of ArrayAccess: Uncaught PhpSpec\Exception\Example\ErrorException: 8192: Return type of PhpSpec\Wrapper\Subject::offsetExists($key): PhpSpec\Wrapper\Subject should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /builds//vendor/phpspec/phpspec/src/PhpSpec/Wrapper/Subject.php line 248 in /builds/{anonymysed}/vendor/phpspec/phpspec/src/PhpSpec/Runner/Maintainer/ErrorMaintainer.php:121

 

Stack trace:

 

#0 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Wrapper/Subject.php(122): PhpSpec\Runner\Maintainer\ErrorMaintainer->errorHandler()

 

#1 /builds/{anonymised}/vendor/composer/ClassLoader.php(582): include('...')

 

#2 /builds/{anonymised}/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

 

#3 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Wrapper/Wrapper.php(83): Composer\Autoload\ClassLoader->loadClass()

 

#4 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Runner/Maintainer/SubjectMaintainer.php(87): PhpSpec\Wrapper\Wrapper->wrap()

 

#5 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Runner/ExampleRunner.php(147): PhpSpec\Runner\Maintainer\SubjectMaintainer->prepare()

 

#6 /builds/{anomymised}/vendor/phpspec/phpspec/src/PhpSpec/Runner/ExampleRunner.php(85): PhpSpec\Runner\ExampleRunner->executeExample()

 

#7 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Runner/SpecificationRunner.php(61): PhpSpec\Runner\ExampleRunner->run()

 

#8 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Runner/SuiteRunner.php(59): PhpSpec\Runner\SpecificationRunner->run()

 

#9 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Console/Command/RunCommand.php(178): PhpSpec\Runner\SuiteRunner->run()

 

#10 /builds/{anonymised}/vendor/symfony/console/Command/Command.php(298): PhpSpec\Console\Command\RunCommand->execute()

 

#11 /builds/{anonymised}/vendor/symfony/console/Application.php(1042): Symfony\Component\Console\Command\Command->run()

 

#12 /builds/{anonymised}/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()

 

#13 /builds/{anonymised}/vendor/phpspec/phpspec/src/PhpSpec/Console/Application.php(89): Symfony\Component\Console\Application->doRun()

 

#14 /builds/{anonymised}/vendor/symfony/console/Application.php(171): PhpSpec\Console\Application->doRun()

 

#15 /builds/{anonymysed}/vendor/phpspec/phpspec/bin/phpspec(25): Symfony\Component\Console\Application->run()

 

#16 /builds/{anonymysed}/vendor/phpspec/phpspec/bin/phpspec(27): {closure}()

 

#17 /builds/{anonymysed}/vendor/bin/phpspec(120): include('...')

 

#18 {main} in /builds/{anonymysed}/vendor/phpspec/phpspec/src/PhpSpec/Wrapper/Subject.php on line 122

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions