This is guide for upgrade from version 1.x to 2.0 for using the CLI tool.
Rules and sets
To configure which fixers should be used you must now set rules and sets instead of fixers and level. This affects both configuration file and CLI arguments.
Default ruleset was changed from Symfony standard to more generic PSR2. You can still use Symfony standard, which in fact extends PSR2.
The term of risky fixers was introduced. Risky fixer is a fixer that may change the meaning of code (like StrictComparisonFixer fixer, which will change == into ===). No rules that are followed by risky fixers are run by default. You need to explicitly permit risky fixers to run them.
Default configuration changes
By default, PSR2 rules are used instead of Symfony rules.
Files that will be fixed are php/phpt/twig instead of php/twig/xml/yml.
Finally, the caching mechanism is enabled by default.
CLI options
1.x
2.0
Description
Note
--allow-risky
Are risky fixers allowed
--cache-file
The path to the cache file
option was added
--config
Config class codename
option was removed
--config-file
--config
The path to a .php_cs file
option was renamed
--diff
--diff
Show diff
--dry-run
--dry-run
Run in dry-run mode
--fixers
Coding standard fixers
option was removed, see --rules
--format
--format
Choose format
--level
Coding standard level
option was removed, see --rules
--path-mode
Should the finder from config beoverridden or intersected with path arg
option was added
--rules
Rules to be used
option was added
--using-cache
Does cache should be used
option was added
CLI argument
On 2.x line path argument is an array, so you may pass multiple paths.
Intersection path mode makes the path argument a mask for finder you have defined in your configuration file.
Only files pointed by both finder and CLI path argument will be fixed.
Exit codes
Exit codes for fix command have been changed and are build using the following bit flags:
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Bumps friendsofphp/php-cs-fixer from 1.11.4 to 2.16.4.
Release notes
Sourced from friendsofphp/php-cs-fixer's releases.
Changelog
Sourced from friendsofphp/php-cs-fixer's changelog.
Upgrade guide
Sourced from friendsofphp/php-cs-fixer's upgrade guide.
Commits
1023c34
CI: skip_cleanup: truec86bcc4
prepared the 2.16.4 release0093132
Merge branch '2.15' into 2.16a8de87d
bumped version1617a6e
prepared the 2.15.8 release691cf0a
bug #5018 PhpdocScalarFixer - fix for comment with Windows line endings (kuba...213c93e
PhpdocScalarFixer - fix for comment with Windows line endings5e6acea
Merge branch '2.15' into 2.16dfc4f07
bug #5029 SingleLineAfterImportsFixer - fix for line after import already add...5881633
SingleLineAfterImportsFixer - fix for line after import already added using CRLFDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)