Skip to content

Releases: PHPCSStandards/PHPCSUtils

1.0.12 - 2024-05-20

20 May 13:47
87b233b
Compare
Choose a tag to compare

Added

PHPCS BackCompat

  • BCFile::getMemberProperties(): sync with PHPCS 3.10.0 - support for PHP 8.2 DNF types. #604
  • BCFile::getMethodProperties(): sync with PHPCS 3.10.0 - support for PHP 8.2 DNF types. #604
  • BCFile::getMethodParameters(): sync with PHPCS 3.10.0 - support for PHP 8.2 DNF types. #604

Utils

  • FunctionDeclarations::getParameters(): support for PHP 8.2 DNF types. #604
  • FunctionDeclarations::getProperties(): support for PHP 8.2 DNF types. #604
  • Variables::getMemberProperties(): support for PHP 8.2 DNF types. #604

Changed

Tokens

  • Collections::parameterTypeTokens(), Collections::propertyTypeTokens() and Collections::returnTypeTokens(): now include the new T_TYPE_OPEN_PARENTHESIS and T_TYPE_CLOSE_PARENTHESIS tokens for PHP 8.2 DNF type support. #604

Utils

  • ControlStructures::getCaughtExceptions(): will now silently ignore parse errors in the code under scan which prevent the method from analyzing a catch statement. #594
    The method will now return an empty array instead of throwing a PHP_CodeSniffer\Exceptions\RuntimeException.

Other

  • Dropped support for PHP_CodeSniffer < 3.10.0. #603
    Please ensure you run composer update phpcsstandards/phpcsutils --with-dependencies to benefit from this.
  • Various housekeeping and documentation improvements.

Fixed

Utils

  • UseStatements::splitImportUseStatement(): the values in the return array will now never include a leading backslash. #590
    Previously the behaviour around import use statements declared with a leading backslash was undefined and the backslash would be included in the return value.

1.0.11 - 2024-04-24

24 Apr 11:53
c457da9
Compare
Choose a tag to compare

Changed

Other

  • Various housekeeping and documentation improvements. Includes a contribution from @fredden.

Fixed

PHPCS BackCompat

  • BCFile::getMethodProperties(): small performance improvement & more defensive coding, in line with same fix in PHPCS 3.9.2. #573

Utils

  • FunctionDeclarations::getProperties(): small performance improvement & more defensive coding, in line with same fix in PHPCS 3.9.2. #573

1.0.10 - 2024-03-18

17 Mar 23:55
51609a5
Compare
Choose a tag to compare

Changed

Other

  • Dropped support for PHP_CodeSniffer < 3.9.0. #561
    Please ensure you run composer update phpcsstandards/phpcsutils --with-dependencies to benefit from this.
  • Various housekeeping and documentation improvements.

Deprecated

Utils

  • NamingConventions::AZ_UPPER constant. #563
  • NamingConventions::AZ_LOWER constant. #563

Fixed

PHPCS BackCompat

  • BackCompat\Helper::getEncoding(): PHP 8.4 deprecation notice. #568
  • BackCompat\Helper::ignoreAnnotations(): PHP 8.4 deprecation notice. #568

1.0.9 - 2023-12-08

08 Dec 14:54
908247b
Compare
Choose a tag to compare

Added

PHPCS BackCompat

  • BCFile::getMemberProperties(): sync with PHPCS 3.8.0 - support for PHP 8.2 true type. #524
  • BCFile::getMethodProperties(): sync with PHPCS 3.8.0 - support for PHP 8.2 true type. #524
  • BCFile::getMethodParameters(): sync with PHPCS 3.8.0 - support for PHP 8.2 true type. #524

Changed

TestUtils

Other

  • Dropped support for PHP_CodeSniffer < 3.8.0. #523
    Please ensure you run composer update phpcsstandards/phpcsutils --with-dependencies to benefit from this.
  • Small improvements to the documentation website generation. Includes a contribution from @fredden.
  • Various housekeeping and documentation improvements. Includes a contribution from @fredden.

1.0.8 - 2023-07-17

16 Jul 21:45
69465ca
Compare
Choose a tag to compare

Changed

PHPCS BackCompat

  • BCFile::getDeclarationName(): sync with PHPCS 3.8.0 - support for functions called self, parent or static which return by reference. #494

Other

  • Various housekeeping and minor documentation improvements.

Fixed

Fixers

  • The SpacesFixer will no longer throw an (incorrect) exception when the second pointer passed is a comment token and this comment token is the last content in a file. #493

1.0.7 - 2023-07-10

10 Jul 14:03
886a728
Compare
Choose a tag to compare

Changed

Other

  • Various housekeeping and maintenance updates, including making the test suite compatible with PHPUnit 10.

Fixed

Utils

  • The Arrays::getDoubleArrowPtr() method could previously get confused over a double arrow in a keyed list used as an array value. #485

1.0.6 - 2023-05-27

27 May 14:02
ba259ea
Compare
Choose a tag to compare

Changed

PHPCS BackCompat

  • BCFile::getClassProperties(): sync with PHPCS 3.8.0 - support for PHP 8.2 readonly classes. #470
  • BCFile::getMethodParameters(): sync with PHPCS 3.8.0 - support for constructor property promotion with readonly properties without explicit visibility. #472

Utils

  • The results of the following methods will now (also) be cached for improved performance when multiple sniffs call these functions for the same token during a PHPCS run. #464, #466
    • FunctionDeclarations::getProperties()
    • Variables::getMemberProperties()
  • Additionally, the results of the UseStatements::splitImportUseStatement() method will be cached more often and the cache checked earlier. #467
  • The return value of the ControlStructures::getCaughtExceptions() method will no longer contain "empty" entries for catch statements without a named exception. It will return an empty array instead. #474

Other

  • Various small housekeeping and maintenance updates.

Fixed

Abstract Sniffs

  • AbstractArrayDeclarationSniff: fixed a potential "Trying to access array offset on value of type bool" PHP notice. #476
  • AbstractArrayDeclarationSniff: the abstract will no longer trigger potentially available magic __get()/__set() etc methods. #477

1.0.5 - 2023-04-17

17 Apr 16:35
0cfef51
Compare
Choose a tag to compare

Fixed

Utils

  • The Lists::getAssignments() method could previously get confused over exotic list keys. Fixed now. #459

1.0.4 - 2023-04-15

15 Apr 09:01
6b0c204
Compare
Choose a tag to compare

Changed

Other

  • Minor documentation improvements.

Fixed

Utils

  • The FunctionDeclarations::getParameters() method will now correctly handle constructor promoted properties with readonly, but without explicit visibility set. #456

1.0.3 - 2023-04-13

13 Apr 02:32
73d7b07
Compare
Choose a tag to compare

Changed

Other

  • Various small housekeeping and maintenance updates.

Fixed

Utils

  • The PassedParameters class now allows for function calls to global functions called self(), parent() or static(). #452