Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--level all still valid? #120

Closed
Heart1010 opened this issue Nov 13, 2014 · 1 comment
Closed

--level all still valid? #120

Heart1010 opened this issue Nov 13, 2014 · 1 comment

Comments

@Heart1010
Copy link

I just installed your sublime-phpcs plugin (ST3) and the default php-cs-fixer setting shows

"php_cs_fixer_additional_args": {
        "--level": "all"
    },

...is this --level parameter still valid? I got the following in console (debug set to on)
The level "all" is not defined.

The usage doc from php-cs-fixer shows this:

The fix command tries to fix as much coding standards problems as possible on a given file or directory:

php php-cs-fixer.phar fix /path/to/dir
php php-cs-fixer.phar fix /path/to/file

The --level option limits the fixers to apply on the project:

php php-cs-fixer.phar fix /path/to/project --level=psr0
php php-cs-fixer.phar fix /path/to/project --level=psr1
php php-cs-fixer.phar fix /path/to/project --level=psr2
php php-cs-fixer.phar fix /path/to/project --level=symfony

By default, all PSR-2 fixers and some additional ones are run. The "contrib level" fixers cannot be enabled via this option; you should instead set them manually by their name via the --fixers option.

@benmatselby
Copy link
Owner

Thanks for raising this. This functionality has changed in the newly released version 1.0 of php-cs-fixer. Updated the default settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants