Skip to content

Releases: GEWIS/gewisphp-coding-standards

Version 2.1.1

Choose a tag to compare

@tomudding tomudding released this 27 May 20:22
ee93e44

Fixes

  • --no-scripts is passed to Composer to disable post-install scripts.

Full Changelog: 2.1.0...2.1.1

Version 2.1.0

Choose a tag to compare

@tomudding tomudding released this 27 May 19:57
dce5fc2

Additions

  • Allow the installation of PHP extensions through the extensions input. Must be formatted as a comma-separated list in a string.

Full Changelog: 2.0.1...2.1.0

Version 2.0.1

Choose a tag to compare

@tomudding tomudding released this 25 May 10:57
1b07b06

Fixes

  • Corrected the new expression rule: now uses SlevomatCodingStandard.ControlStructures.NewWithParentheses (was mistakenly set to NewWithoutParentheses), enforcing new Foo() over new Foo for consistency with constructor calls that take arguments.

Full Changelog: 2.0.0...2.0.1

Version 2.0.0

Choose a tag to compare

@tomudding tomudding released this 25 May 10:41
9538bf0

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 >= 2 arguments.
  • if conditions must be multi-line when they contain >= 2 parts.
  • assert() is now enforced via SlevomatCodingStandard.PHP.RequireExplicitAssertion -> set zend.assertions to 0 or -1 in 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 class order.
  • SlevomatCodingStandard.Classes.DisallowStringExpressionPropertyFetch: forbids $foo->{'bar'}.
  • SlevomatCodingStandard.Classes.TraitUseOrder: alphabetical trait use.
  • SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.
  • SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator and RequireMultiLineTernaryOperator.
  • SlevomatCodingStandard.Commenting.RequireOneDocComment: multiple doc comments must be joined.
  • SlevomatCodingStandard.PHP.UselessParentheses: now also checks around new.

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

Choose a tag to compare

@tomudding tomudding released this 29 Jun 14:45
5f8e7d3

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

Choose a tag to compare

@tomudding tomudding released this 07 May 18:29
09c17b4

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

Choose a tag to compare

@tomudding tomudding released this 22 Feb 15:25
7915130

Sets persist-credentials: false for actions/checkout.

Version 1.2.0

Choose a tag to compare

@tomudding tomudding released this 11 Sep 13:38
39edf4a

Upgraded actions/checkout and ramsey/composer-install because of the Node 16 -> Node 20 migration on the Action runners.

Version 1.1.0

Choose a tag to compare

@tomudding tomudding released this 09 Dec 12:12
b470227

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

Choose a tag to compare

@tomudding tomudding released this 28 Apr 17:27
2d4cf40

Allow that arrays can be expanded when they only contain a single value.