Releases: GEWIS/gewisphp-coding-standards
Release list
Version 2.1.1
Fixes
--no-scriptsis passed to Composer to disable post-install scripts.
Full Changelog: 2.1.0...2.1.1
Version 2.1.0
Additions
- Allow the installation of PHP extensions through the
extensionsinput. Must be formatted as a comma-separated list in a string.
Full Changelog: 2.0.1...2.1.0
Version 2.0.1
Fixes
- Corrected the
newexpression rule: now usesSlevomatCodingStandard.ControlStructures.NewWithParentheses(was mistakenly set toNewWithoutParentheses), enforcingnew Foo()overnew Foofor consistency with constructor calls that take arguments.
Full Changelog: 2.0.0...2.0.1
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).
Version 1.3.1
Updates the coding standards library from Slevomat. As a result, Squiz.WhiteSpace.LanguageConstructSpacing is now Generic.WhiteSpace.LanguageConstructSpacing.
Full Changelog: 1.3.0...1.3.1
Version 1.3.0
Updates the coding standards library from Slevomat. As a result, the UnionTypeHintFormat has been replaced with DNFTypeHintFormat.
Full Changelog: 1.2.1...v1.3.0
Version 1.2.1
Sets persist-credentials: false for actions/checkout.
Version 1.2.0
Upgraded actions/checkout and ramsey/composer-install because of the Node 16 -> Node 20 migration on the Action runners.
Version 1.1.0
PHP_CodeSniffer has a new release, v3.8.0, which is the result of a fork after the original repository had been abandoned. Next to that the default PHP version is now 8.3.
Version 1.0.1
Allow that arrays can be expanded when they only contain a single value.