Skip to content

Commit b09238d

Browse files
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
2 parents 7aa8ce0 + a315f9a commit b09238d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

.php-cs-fixer.dist.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
'@Symfony:risky' => true,
3131
'protected_to_private' => false,
3232
'native_constant_invocation' => ['strict' => false],
33-
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false],
3433
'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true],
3534
'header_comment' => ['header' => $fileHeaderComment],
3635
])

0 commit comments

Comments
 (0)