Skip to content

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

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

Closed
wants to merge 2 commits into from

Conversation

iluuu1994
Copy link
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
Copy link
Member

@Girgias Girgias left a comment

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
Copy link
Member

Girgias commented Jun 28, 2023

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