Skip to content

Fix missing "Optional parameter before required" deprecation on union null type - #11497

Closed
iluuu1994 wants to merge 2 commits into
php:masterfrom
iluuu1994:gh-11488
Closed

iluuu1994 wants to merge 2 commits into
php:masterfrom
iluuu1994:gh-11488

Conversation

@iluuu1994

Copy link
Copy Markdown
Member

The check would only work for the ?type syntax, but not type|null. Switch to a check during type compilation instead.

Fixes GH-11488

… null type

The check would only work for the ?type syntax, but not  type|null. Switch to a
check during type compilation instead.

Fixes phpGH-11488

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I do think we should look into deprecating the legacy way of declaring a nullable type as it makes for some confusing rules.

@Girgias

Girgias commented Jun 28, 2023

Copy link
Copy Markdown
Member

MacOS failure is unrelated.

But again LGTM still :)

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.

null default-value promoted class parameter before required parameter is silently ignored

2 participants