You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #476 [CS] Remove 'nullable_type_declaration_for_default_null_value' rule (smnandre)
This PR was merged into the 1.x branch.
Discussion
----------
[CS] Remove 'nullable_type_declaration_for_default_null_value' rule
Not too sure here with all the PHP versions to consider...
Using [nullable_type_declaration_for_default_null_value](https://cs.symfony.com/doc/rules/function_notation/nullable_type_declaration_for_default_null_value.html) rule with value `['use_nullable_type_declaration' => false]` is deprecated.
And, if i take the [Example 4](https://cs.symfony.com/doc/rules/function_notation/nullable_type_declaration_for_default_null_value.html#example-4), this rule enforces code that will trigger deprecation warning with PHP 8.4.. right ?
```diff
--- 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 ?
Commits
-------
a315f9a Update .php-cs-fixer.dist.php
0 commit comments