benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
812 stars 126 forks source link

Latest Version of php-cs-fixer causing errors in ST3 #125

Closed valeryan closed 9 years ago

valeryan commented 9 years ago

When I try to run the php-cs-fixer in ST3 I get this:

[Phpcs] Linter found 0 errors
[Phpcs] Sniffer found 61 errors
[Phpcs] /usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar fix /Users/hilsonsr/Projects/americas-army-comet-laravel/app/Http/Controllers/V1/MapsController.php --verbose --level=all
[Phpcs] /usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar fix /Users/hilsonsr/Projects/americas-army-comet-laravel/app/Http/Controllers/V1/MapsController.php --verbose --level=all
[Phpcs] cwd: /Users/hilsonsr
[Phpcs] 

  [InvalidArgumentException]       
  The level "all" is not defined. 

Exception trace:
 () at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/Symfony/CS/ConfigurationResolver.php:154
 Symfony\CS\ConfigurationResolver->parseLevel() at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/Symfony/CS/ConfigurationResolver.php:92
 Symfony\CS\ConfigurationResolver->resolveByLevel() at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/Symfony/CS/ConfigurationResolver.php:69
 Symfony\CS\ConfigurationResolver->resolve() at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/Symfony/CS/Console/Command/FixCommand.php:354
 Symfony\CS\Console\Command\FixCommand->execute() at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar:25

fix [--config="..."] [--config-file[="..."]] [--dry-run] [--level="..."] [--fixers="..."] [--diff] [--format="..."] [path]

Installed php-cs-fixer 1.2 through homebrew and I set executable path to the .phar file.

"php_cs_fixer_executable_path": "/usr/local/Cellar/php-cs-fixer/1.2/libexec/php-cs-fixer.phar"

ST3 Build 3071

benmatselby commented 9 years ago

Hi @valeryan

Can you update your settings please?

See commit: 8d6dff247442417e1e650a6e5bae5a52bddc6306