Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 25, 2022

Note: this is a minimal update to get rid of some deprecations and such. Once this has been merged, a lot more PRs will follow which will actually implement the new functionality from PHPCSUtils 1.0.0-alpha4.

PHPCSUtils 1.0.0-alpha4: ValidIntegers: remove use of Numbers::REGEX_NUMLIT_STRING

This constant has been removed from PHPCSUtils as it is no longer needed there. The regex which was previously contained in PHPCSUtils has now been copied into this sniff.

PHPCSUtils 1.0.0-alpha4: replace deprecated Collections properties and methods

The direct use of the static properties in the PHPCSUtils\Tokens\Collections class has been deprecated.
Additionally, a number of methods in the same class have been deprecated as they are no longer needed now PHPCS < 3.7.1 is no longer supported.

This updates the sniffs to no longer use this deprecated functionality.

Includes switching to more appropriate (new) token collection when possible.

Includes a small change in the NewShortArray sniff to only determine whether something is a short array once, while still showing the same error notices. (efficiency tweak)

See: https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha4

jrfnl added 2 commits October 24, 2022 14:21
…_NUMLIT_STRING`

This constant has been removed from PHPCSUtils as it is no longer needed there. The regex which was previously contained in PHPCSUtils has now been copied into this sniff.
…d methods

The direct use of the static properties in the `PHPCSUtils\Tokens\Collections` class has been deprecated.
Additionally, a number of methods in the same class have been deprecated as they are no longer needed now PHPCS < 3.7.1 is no longer supported.

This updates the sniffs to no longer use this deprecated functionality.

Includes switching to more appropriate (new) token collection when possible.

Includes a small change in the `NewShortArray` sniff to only determine whether something is a short array once, while still showing the same error notices. (efficiency tweak)

See: https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha4
@jrfnl jrfnl added PR: high priority PR: quick merge PR only contains relatively simple changes PR: ready for review labels Oct 25, 2022
@jrfnl jrfnl added this to the 10.0.0 milestone Oct 25, 2022
@jrfnl jrfnl requested a review from wimg October 25, 2022 14:08
@jrfnl jrfnl merged commit a726377 into develop Oct 25, 2022
@jrfnl jrfnl deleted the feature/update-for-phpcsutils-alpha4 branch October 25, 2022 14:39
@jrfnl
Copy link
Member Author

jrfnl commented Oct 25, 2022

For all #PHPCompatibility users out there currently using the develop branch:

PHPCSUtils-1.0.0alpha4 has been released, so make sure you use composer update --with-[all-]dependencies when updating PHPCompatibility!

@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants