Skip to content

PHP 8.4 | Tokenizer/PHP: fix union/intersection/DNF type tokenization with abstract properties #1183

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

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 11, 2025

Description

This commit adds support for abstract properties to the PHP Tokenizer as otherwise the retokenization of | to T_TYPE_UNION, & to T_TYPE_INTERSECTION and the parenthesis in DNF types to T_TYPE_*_PARENTHESIS would be broken.

Fixed now.

Includes tests.
Includes some extra tests for the T_NULLABLE tokenization as well, just to be on the safe side.

Suggested changelog entry

  • Added support for PHP 8.4 abstract properties in the Tokenizer.

Related issues/external references

Related to #734

… with abstract properties

This commit adds support for `abstract` properties to the PHP Tokenizer as otherwise the retokenization of `|` to `T_TYPE_UNION`, `&` to `T_TYPE_INTERSECTION` and the parenthesis in DNF types to `T_TYPE_*_PARENTHESIS` would be broken.

Fixed now.

Includes tests.
Includes some extra tests for the `T_NULLABLE` tokenization as well, just to be on the safe side.
@jrfnl jrfnl added this to the 3.13.3 milestone Aug 11, 2025
@jrfnl jrfnl merged commit 916eb08 into master Aug 12, 2025
151 of 162 checks passed
@jrfnl jrfnl deleted the php-8.4/tokenizer-php-support-abstract-properties branch August 12, 2025 00:26
@jrfnl jrfnl mentioned this pull request Jul 16, 2025
43 tasks
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.

1 participant