-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
[DowngradePhp80] Add DowngradeNumberFormatNoFourthArgRector #1649
Conversation
All checks have passed 🎉 @TomasVotruba it is ready for review. |
Thank you 👍 |
Mm, it seems after switching to "merge" strategy, all the detailed commits are now part of Do you think you could squash to 1-3 important commits next time? So we have only meaninful history of commits |
@@ -225,7 +225,7 @@ public function findFirstNonAnonymousClass(array $nodes): ?Node | |||
|
|||
/** | |||
* @param Node|Node[] $nodes | |||
* @param callable(Node $node): bool $filter | |||
* @param callable(Node $filter): bool $filter |
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.
This "fix" looks like a workaround
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.
Yes
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.
that's possibly due to cs fixer:
- * @param Node|Node[] $nodes
- * @param callable(Node $node): bool $filter
+ * @param Node|Node[] $filters
+ * @param callable(Node $filter): bool $filter
*/
public function findFirst(Node | array $nodes, callable $filter): ?Node
{
----------- end diff -----------
Applied checkers:
* PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer
* PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer
* PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer
* Symplify\CodingStandard\Fixer\Commenting\ParamReturnAndVarTagMalformsFixer
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.
Ok, it seems because of Symplify\CodingStandard\Fixer\Commenting\ParamReturnAndVarTagMalformsFixer
@TomasVotruba will try 👍 |
In php 8.0, number_format allow up to 3rd argument without 4th argument, eg:
but it will cause error in php 7.x, ref https://3v4l.org/pq9e1
This PR add
DowngradeNumberFormatNoFourthArgRector
to add 4th argument by default value.