PHP-CS-Fixer: The rules contain unknown fixers
When executing php-cs-fixer I always receive the following error:
In ConfigurationResolver.php line 745:
The rules contain unknown fixers: "php_unit_fqcn_annotation", "phpdoc_types" (did you mean "phpdoc_order"?).
The problem only occurs when I use the “@Symfony” rule set. With the “@PSR2” rule set everything is working. Also in other projects the configuration is working as expected.
The PHP version you are using ($ php -v
):
PHP 7.1.9-1+0~20170902060604.8+jessie~1.gbpebe5d6 (cli) (built: Sep 2 2017 06:21:43) ( NTS ) Copyright © 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright © 1998-2017 Zend Technologies with Zend OPcache v7.1.9-1+0~20170902060604.8+jessie~1.gbpebe5d6, Copyright © 1999-2017, by Zend Technologies with Xdebug v2.5.5, Copyright © 2002-2017, by Derick Rethans
PHP CS Fixer version you are using ($ php-cs-fixer -V
):
PHP CS Fixer 2.9.0 Speechless by Fabien Potencier and Dariusz Ruminski
The command you use to run PHP CS Fixer:
php-cs-fixer fix --dry-run
The configuration file you are using, if any:
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
;
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
])
->setUsingCache(false)
->setFinder($finder)
;
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 29 (14 by maintainers)
I removed now every dependency and created a single directory with only one file. Still the same error.
composer.json
The file “Foo.php” in the directory “app” (this is the only file in this directory):
In addition I tried to run it with PHP 7.0 and 7.1 and I get different errors.
With 7.1 inside Docker:
With 7.0 inside Docker:
With 7.1 on my Mac: