ramsey/coding-standard
ramsey/coding-standard provides Ramsey’s PHP_CodeSniffer ruleset to enforce consistent, modern PHP style across projects. Easy to install, integrates with CI, and helps catch formatting and code quality issues early with sensible defaults.
Generic.WhiteSpace.LanguageConstructSpacing instead of the deprecated Squiz.WhiteSpace.LanguageConstructSpacing.SlevomatCodingStandard.TypeHints.UnionTypeHintFormat to SlevomatCodingStandard.TypeHints.DNFTypeHintFormat.^8.16.0.Ignore the IncorrectWhitespaceBeforeDeclare error emitted by the SlevomatCodingStandard.TypeHints.DeclareStrictTypes sniff.
In my personal projects, I usually have 2 newlines before the declare statement. One before the file header comment and one after. However, in tests, I have no file header comment, so there is only 1 newline before the declare statement. Since I like my tests to follow the same coding standard as the rest of my source, it is easiest to ignore this error.
SlevomatCodingStandard.TypeHints.UnionTypeHintFormat.Upgrade to slevomat/coding-standard version 7.
This may require downstream changes, since some Slevomat sniffs have BC breaks. This is why ramsey/coding-standard is bumping to version 2.0.0 for this change.
See the Slevomat changelog for 7.0.0 for details.
This is technically a BC break, so I am sorry, but since this package is brand new and so few have downloaded to date, I decided to go ahead and make this change in the 1.x series.
How can I help you explore Laravel packages today?