Upgrading doctrine/coding-standard 5 to 6
Breaking5.0.1 → 6.0.1Breaking8New1Changed6Other5
BreakingUpgrade verdict
8 breaking changes.
In plain terms
- Files may no longer carry the default IDE header with an author name.
- Class, trait, interface and exception names may no longer start or end with these words.
- Only a single blank line is allowed between function declarations.
- Short one-line class docblocks like `/** class Foo */` are no longer allowed.
Must act Top 3 of 8 that need code or config changes
What you must change
Breaking8
Disallows the PHPStorm/IntelliJ default file header that includes the author name.
Disallows Abstract, Trait, Exception and Interface prefixes along with suffixes in class-like names.
Forbids multiple blank lines between declared functions.
Disallows
/** class Foo */ style comments for class Foo.Forbids duplicate variable assignments such as
$foo = $foo = bar().Enforces spacing between the type declaration and the variadic declaration of a function parameter.
Forbids late static binding for constants, so
$foo::BAR is now a violation.Requires an empty line before a return statement when not directly within a flow control construct.