Repository navigation
PHP 8.2: add support for DNF types - #604
Merged
Merged
Conversation
Upstream PR PHPCSStandards/PHP_CodeSniffer 387 introduced support for DNF types to PHPCS itself, introducing two new tokens for the DNF parentheses: `T_TYPE_OPEN_PARENTHESIS` and `T_TYPE_CLOSE_PARENTHESIS`. This commit adds these new tokens to the appropriate token collections in the `Collections` class. This will automatically add support for DNF types to various methods in PHPCSUtils. Includes updated unit tests.
…upport for DNF types The changes in the `BCFile` class mirror the upstream changes. As for the `FunctionDeclarations` class: support was automatically added when the `Collections::parameterTypeTokens()` were updated. Includes tests. Closes 567
…ests for DNF types The `BCFile` method inherites the necessary changes from PHPCS 3.10.0.. As for the `FunctionDeclarations` class: support was automatically added when the `Collections::returnTypeTokens()` were updated. Includes tests.
…types The `BCFile` method inherites the necessary changes from PHPCS 3.10.0.. As for the `Variables` class: support was automatically added when the `Collections::propertyTypeTokens()` were updated. Includes tests.
jrfnl
force-pushed
the
php-8.2/add-support-for-dnf-types
branch
from
May 20, 2024 12:37
163436e to
a631970
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP 8.2 | Collections: add support for DNF types
Upstream PR PHPCSStandards/PHP_CodeSniffer#387 introduced support for DNF types to PHPCS itself, introducing two new tokens for the DNF parentheses:
T_TYPE_OPEN_PARENTHESISandT_TYPE_CLOSE_PARENTHESIS.This commit adds these new tokens to the appropriate token collections in the
Collectionsclass.This will automatically add support for DNF types to various methods in PHPCSUtils.
Includes updated unit tests.
PHP 8.2 | BCFile/FunctionDeclarations::get[Method]Parameters(): add support for DNF types
The changes in the
BCFileclass mirror the upstream changes.As for the
FunctionDeclarationsclass: support was automatically added when theCollections::parameterTypeTokens()were updated.Includes tests.
Closes #567
PHP 8.2 | BCFile/FunctionDeclarations::get[Method]Properties(): add tests for DNF types
The
BCFilemethod inherits the necessary changes from PHPCS 3.10.0..As for the
FunctionDeclarationsclass: support was automatically added when theCollections::returnTypeTokens()were updated.Includes tests.
PHP 8.2 | BCFile/Variables::getMemberProperties(): add tests for DNF types
The
BCFilemethod inherites the necessary changes from PHPCS 3.10.0..As for the
Variablesclass: support was automatically added when theCollections::propertyTypeTokens()were updated.Includes tests.
IsReferenceTest: add extra tests with intersection/DNF types