Skip to content
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

[CS] Remove 'nullable_type_declaration_for_default_null_value' rule #476

Merged
merged 1 commit into from Apr 12, 2024

Conversation

smnandre
Copy link
Contributor

@smnandre smnandre commented Apr 6, 2024

Not too sure here with all the PHP versions to consider...

Using nullable_type_declaration_for_default_null_value rule with value ['use_nullable_type_declaration' => false] is deprecated.

And, if i take the Example 4, this rule enforces code that will trigger deprecation warning with PHP 8.4.. right ?

--- Original
+++ New
 <?php
-function sample(string|int|null $str = null)
+function sample(string|int $str = null)
 {}

I guess it's not so simple to revert the rule, so maybe a first step could be to remove the rule and avoid CI failures ?

@nicolas-grekas
Copy link
Member

Thank you @smnandre.

@nicolas-grekas nicolas-grekas merged commit b09238d into symfony:1.x Apr 12, 2024
6 of 10 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.

None yet

2 participants