Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collections: deprecate $OONameTokens in favour of namespacedNameTokens() #202

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 13, 2020

Deprecate the $OONameTokens property in favour of a new Collections::namespacedNameTokens() method.

PHP 8.0 introduces three new tokens to represent identifier names. As those tokens will not always be available, a property can't handle this.

In anticipation of the introduction of the new tokens, I'm deprecating the Collections::$OONameTokens property to prevent BC breaks at a later point in time.

Includes adding unit tests for the new method.

Includes switching out existing uses of the deprecated property for the new method.

Deprecate the `$OONameTokens` property in favour of a new `Collections::namespacedNameTokens()` method.

PHP 8.0 introduces three new tokens to represent identifier names. As those tokens will not always be available, a property can't handle this.

In anticipation of the introduction of the new tokens, I'm deprecating the `Collections::$OONameTokens` property to prevent BC breaks at a later point in time.

Includes adding unit tests for the new method.

Includes switching out existing uses of the deprecated property for the new method.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Sep 13, 2020
@jrfnl jrfnl merged commit e01c170 into develop Sep 13, 2020
@jrfnl jrfnl deleted the feature/collections-deprecate-oonametokens-add-namespacednametoken-method branch September 13, 2020 16:15
jrfnl added a commit that referenced this pull request Dec 24, 2022
Use the `PHPCSUtils\Tokens\Collections::namespacedNameTokens()` method instead.

Follow up to #113, #202.
jrfnl added a commit that referenced this pull request Dec 24, 2022
... and remove the remaining methods without logic (but which had a name change one way or the other).

Follow-up after #202, #311.

Includes updating the tests:
* Mostly remove method specific tests and move those to the `PropertyBasedTokenArraysTest`.
* For the "type" token arrays - update the order of the expected arrays.
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.

None yet

1 participant