You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./php-cs-fixer -vvv fix Test.php
PHP CS Fixer 3.13.0 Oliva by Fabien Potencier and Dariusz Ruminski.
PHP runtime: 8.1.4
Loaded config polyestershoppen.nl from "/srv/.php-cs-fixer.dist.php".
Using cache file ".php-cs-fixer.cache".
Paths from configuration file have been overridden by paths provided as command arguments.
E 1 / 1 (100%)
Legend: .-no changes, F-fixed, S-skipped (cached or empty file), I-invalid file syntax (file ignored), E-error
Fixed all files in 0.012 seconds, 14.000 MB memory used
Files that were not fixed due to errors reported during fixing:
1) /srv/Test.php
[ErrorException]
Undefined array key "type"{closure}()
in /srv/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php at line 74
PhpCsFixer\Doctrine\Annotation\Tokens::createFromDocComment()
in /srv/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php at line 62
PhpCsFixer\AbstractDoctrineAnnotationFixer->applyFix()
in /srv/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php at line 75
PhpCsFixer\AbstractFixer->fix()
in /srv/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php at line 173
PhpCsFixer\Runner\Runner->fixFile()
in /srv/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php at line 114
PhpCsFixer\Runner\Runner->fix()
in /srv/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php at line 309
PhpCsFixer\Console\Command\FixCommand->execute()
in /srv/tools/php-cs-fixer/vendor/symfony/console/Command/Command.php at line 312
[ ... ]
Bug report
This looks to be caused by something of a BC break because the dependency on
doctrine/annotations
has no upper boundary; a quick peek shows that https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/src/Doctrine/Annotation/Tokens.php#L61 only does anull
check, but https://github.com/doctrine/annotations/blob/1.14.x/lib/Doctrine/Common/Annotations/DocLexer.php#L137 forces an array to be returned, even if the parent class returnednull
(thus resulting in an empty array). The latter was not the case fordoctrine/annotations
versionv1.13.x
because in that version it inherited thepeek
method from https://github.com/doctrine/lexer/blob/2.0.x/src/AbstractLexer.php which does returnnull
(1.13.x uses lexer 1.x, but the peek implementation has not changed).Code snippet that reproduces the problem
The text was updated successfully, but these errors were encountered: