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
Hey, currently I'm starting to use php-cs-fixer. In one of my projects I'm using traits with an abstract private method.
Down below you can see that I'm using the current version of php-cs-fixer and PHP 8.0. Reading from the debug verbose, the array key "method_private_abstract" for the "order" option is not supported. I am not using this key in my config, but it reads the key from my code and doesn't know what to do with it.
I broke down the configuration and code snippet to the bare minimum. The given command output below is from the config I provide.
PHP Version
PHP 8.0.14 (cli) (built: Dec 20 2021 21:22:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.14, Copyright (c) Zend Technologies
with Zend OPcache v8.0.14, Copyright (c), by Zend Technologies
PHP CS Fixer Version
PHP CS Fixer 3.4.0 Si! by Fabien Potencier and Dariusz Ruminski
Output from the command "./vendor/bin/php-cs-fixer fix app/Traits/Test.php -vvv"
PHP CS Fixer 3.4.0 Si! by Fabien Potencier and Dariusz Ruminski
Runtime: PHP 8.0.14
Loaded config default from "/home/maik/PhpstormProjects/gift/.php-cs-fixer.dist.php".
Paths from configuration file have been overridden by paths provided as command arguments.
E 1 / 1 (100%)
Legend: ?-unknown, I-invalid file syntax (file ignored), S-skipped (cached or empty file), .-no changes, F-fixed, E-error
Fixed all files in 0.002 seconds, 14.000 MB memory used
Files that were not fixed due to errors reported during fixing:
1) /home/maik/PhpstormProjects/gift/app/Traits/Test.php
[ErrorException]
Undefined array key "method_private_abstract"{closure}()
in /home/maik/PhpstormProjects/gift/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php at line 484
PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer->sortElements()
in /home/maik/PhpstormProjects/gift/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php at line 247
PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer->applyFix()
in /home/maik/PhpstormProjects/gift/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php at line 75
PhpCsFixer\AbstractFixer->fix()
in /home/maik/PhpstormProjects/gift/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php at line 188
PhpCsFixer\Runner\Runner->fixFile()
in /home/maik/PhpstormProjects/gift/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php at line 132
PhpCsFixer\Runner\Runner->fix()
in /home/maik/PhpstormProjects/gift/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php at line 321
PhpCsFixer\Console\Command\FixCommand->execute()
in /home/maik/PhpstormProjects/gift/vendor/symfony/console/Command/Command.php at line 298
[ ... ]
Bug report
Hey, currently I'm starting to use php-cs-fixer. In one of my projects I'm using traits with an abstract private method.
Down below you can see that I'm using the current version of php-cs-fixer and PHP 8.0. Reading from the debug verbose, the array key "method_private_abstract" for the "order" option is not supported. I am not using this key in my config, but it reads the key from my code and doesn't know what to do with it.
I broke down the configuration and code snippet to the bare minimum. The given command output below is from the config I provide.
PHP Version
PHP CS Fixer Version
PHP CS Fixer 3.4.0 Si! by Fabien Potencier and Dariusz Ruminski
Output from the command "./vendor/bin/php-cs-fixer fix app/Traits/Test.php -vvv"
Used config file ".php-cs-fixer.dist.php"
Code snippet that reproduces the problem
The text was updated successfully, but these errors were encountered: