Skip to content

fix: dnf types#1216

Merged
alexander-akait merged 2 commits intomainfrom
fix/dnf-types
Mar 19, 2026
Merged

fix: dnf types#1216
alexander-akait merged 2 commits intomainfrom
fix/dnf-types

Conversation

@jorgsowa
Copy link
Collaborator

@jorgsowa jorgsowa commented Mar 18, 2026

Fixes #1126

DNF type support was added for PHP 8.2+, allowing parenthesized intersection types combined with unions (e.g., (A&B)|null). A pre-existing bug was also fixed where PHP 8 type keywords — null, never, mixed, true, and false — were being parsed as name references instead of proper type references. Location tracking for DNF types is correct, with the outer parentheses included in the node's source range.

@jorgsowa jorgsowa marked this pull request as ready for review March 19, 2026 00:41
@alexander-akait alexander-akait merged commit 180e975 into main Mar 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disjunctive Normal Form (DNF) Types is not parsed

2 participants