Version 2.0.0
Requirements
- Now requires PHP 8.5 (previously 8.2). This release targets the newest PHP projects at GEWIS.
Tooling upgrades
- Upgraded to PHP_CodeSniffer v4 (from v3.12).
- Bumped Slevomat Coding Standard to ^8.29 (from ^8.18).
- Added PHPCSExtra (^1.5) for additional sniffs leveraging newer language constructs.
Ruleset changes (breaking)
- Function calls must be multi-line when they have
>= 2arguments. ifconditions must be multi-line when they contain>= 2parts.assert()is now enforced viaSlevomatCodingStandard.PHP.RequireExplicitAssertion-> setzend.assertionsto0or-1in production.
New rules enabled
Universal.Attributes.DisallowAttributeParentheses: no()on attributes without arguments.Universal.Attributes.TrailingComma: trailing comma in multi-line attributes.NormalizedArrays.Arrays.CommaAfterLast: replaces Slevomat's trailing array comma rule.SlevomatCodingStandard.Classes.ClassKeywordOrder: enforces(abstract|final) readonly classorder.SlevomatCodingStandard.Classes.DisallowStringExpressionPropertyFetch: forbids$foo->{'bar'}.SlevomatCodingStandard.Classes.TraitUseOrder: alphabetical trait use.SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperatorandRequireMultiLineTernaryOperator.SlevomatCodingStandard.Commenting.RequireOneDocComment: multiple doc comments must be joined.SlevomatCodingStandard.PHP.UselessParentheses: now also checks aroundnew.
CI
- Default PHP version in the reusable workflow bumped to 8.5.
- GitHub Actions pinned to commit SHAs (checkout v6.0.2, setup-php v2.37.1, composer-install v4.0.0).