-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value #53612
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
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value #53612
Conversation
/cc @keradus FYI I think we should also make the null default value explicit for untyped properties. What's the fixer for that? 👼 |
@@ -0,0 +1,2 @@ | |||
# Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value | |||
f4118e110a46de3ffb799e7d79bf15128d1646ea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😮
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really prefer this way! Thanks 👍🏼 |
a0f56ce
to
fb9fa26
Compare
Same here, this also makes diffs less noisy when converting to CPP 👏 |
Now merged up to 7.1, help wanted to fix tests :) |
@nicolas-grekas , if you wonder about such fixer, I don't think it exists, feel encouraged to drop the PR for it <?php
class X {
- public string $name;
+ public ?string $name;
} |
- public string $name;
+ public ?string $name; Be careful this wouldn't be equivalent! So no, I won't want this rule anytime :) |
This PR was merged into the 2.x branch. Discussion ---------- CS Update | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | n/a | License | MIT Updates to the latest Symfony CS rules. Refs: PHP-CS-Fixer/PHP-CS-Fixer#7773 & symfony/symfony#53612 Commits ------- aad4e17 minor: update cs
This PR was merged into the 2.x branch. Discussion ---------- CS Update | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | n/a | License | MIT Updates to the latest Symfony CS rules. Refs: PHP-CS-Fixer/PHP-CS-Fixer#7773 & symfony/symfony#53612 Commits ------- aad4e17d minor: update cs
This PR was merged into the 2.x branch. Discussion ---------- CS Update | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | n/a | License | MIT Updates to the latest Symfony CS rules. Refs: PHP-CS-Fixer/PHP-CS-Fixer#7773 & symfony/symfony#53612 Commits ------- aad4e17d minor: update cs
This PR was merged into the 2.x branch. Discussion ---------- CS Update | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | n/a | License | MIT Updates to the latest Symfony CS rules. Refs: PHP-CS-Fixer/PHP-CS-Fixer#7773 & symfony/symfony#53612 Commits ------- aad4e17d minor: update cs
This one is important to make on 5.4 because it will likely fix a deprecation in a future PHP version, see https://externals.io/message/122214
(do not squash while merging)