php-cs-fixer nagging about overidden configuration file

Hi, am new to phpstorm, and I might have messed up the configuration a little.

Now it is constantly showing this error says:

5:15 PM PHP CS Fixer
PHP CS Fixer: PHP CS Fixer 2.17.2 Desert Beast by Fabien Potencier and Dariusz Ruminski
Runtime: PHP 7.4.7
Loaded config default from "C:/WebApps/App1/.php_cs".
Using cache file ".php_cs.cache".
Paths from configuration file have been overridden by paths provided as command arguments.
Open PHP CS Fixer Inspection Settings

If I want it to use the .php_cs configuration file, then where can I remove this particular "paths provided as command arguments"?

1
6 comments

Please try choosing the Custom ruleset at Settings/Preferences | Editor | Inspections | PHP | Quality Tools | PHP CS Fixer and supply the path to the ruleset after clicking the [...] button.

0

Faced same issue, basically after updating to 2020.3. Custom ruleset already have been chosen. Any other ideas?

0

I have the same issue after updating to 2020.3, while using a custom ruleset.

In Editor|Inspections|PHP|Quality tools|PHP CS Fixer validation I have set "Ruleset" to "Custom" and set the path to the following ./php_cs file:

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;

$config = new PhpCsFixer\Config();
return $config->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => false,
'declare_strict_types' => true,
])
->setFinder($finder)
;

I get the following error message:

10:03 AM PHP CS Fixer
PHP CS Fixer: PHP CS Fixer 2.17.2 Desert Beast by Fabien Potencier and Dariusz Ruminski
Runtime: PHP 7.3.5
Loaded config default from "C:/xampp/htdocs/adrexpedite/.php_cs".
Paths from configuration file have been overridden by paths provided as command arguments.
In ConfigurationResolver.php line 359:
[PhpCsFixer\ConfigurationException\InvalidConfigurationException (16)]
Open PHP CS Fixer Inspection Settings

If I change Ruleset to "Symfony" I get this error message:

10:22 AM PHP CS Fixer
PHP CS Fixer: PHP CS Fixer 2.17.2 Desert Beast by Fabien Potencier and Dariusz Ruminski
Runtime: PHP 7.3.5
Loaded config default from "C:\xampp\htdocs\adrexpedite\.php_cs".
Using cache file ".php_cs.cache".
Paths from configuration file have been overridden by paths provided as command arguments.
Open PHP CS Fixer Inspection Settings

0

I have this issue too

0

Sorry, apparently I was using a too old PHP CS Fixer version and that is why I couldn't reproduce the issue. The bug is fixed already: https://youtrack.jetbrains.com/issue/WI-57686
You can get it with 2020.3.1 RC: https://blog.jetbrains.com/phpstorm/2020/12/phpstorm-2020-3-1-rc/

0

Unfortunately it is not fixed for me

(PHP CS Fixer 2.18.3 Remote Void and PhpStorm 2020.3.3 Build #PS-203.7717.64, built on March 16, 2021).

I commented on the issue WI-57686.

 

 

0

Please sign in to leave a comment.