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

[Php81] Skip static property on ReadOnlyPropertyRector #1939

Merged
merged 4 commits into from
Mar 16, 2022

Conversation

samsonasik
Copy link
Member

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @simPod

@samsonasik
Copy link
Member Author

rectify's fix-cs seems make inlined method's opening {, seems due to latest symplify.

5) src/Exception/Template/TemplateTypeNotFoundException.php

    ---------- begin diff ----------
@@ -11,8 +11,7 @@
     /**
      * @param string[] $availableTypes
      */
-    public function __construct(string $type, array $availableTypes)
-    {
+    public function __construct(string $type, array $availableTypes) {
         $availableTypesAsString = implode("', ", $availableTypes);

         $message = sprintf('No template found for type "%s". Possible values are "%s"', $type, $availableTypesAsString);
    ----------- end diff -----------


Applied checkers:

 * PhpCsFixer\Fixer\Basic\BracesFixer
 * PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer
 * Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer
 * Symplify\CodingStandard\Fixer\Spacing\StandaloneLineConstructorParamFixer
 * 

@samsonasik samsonasik force-pushed the skip-static-property-readonly branch from 3776ac7 to a46b8d6 Compare March 16, 2022 08:53
@simPod
Copy link
Contributor

simPod commented Mar 16, 2022

Thanks! I'm kind of overwhelmed by OSS work elsewhere rn thus not provided patch right away. Appreciated.

@samsonasik
Copy link
Member Author

I skipped PhpCsFixer\Fixer\Basic\BracesFixer in ecs.php as it now cause { in methods inlined

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba
Copy link
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit f7e1035 into main Mar 16, 2022
@TomasVotruba TomasVotruba deleted the skip-static-property-readonly branch March 16, 2022 09:16
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.

Incorrect behavior of ReadOnlyPropertyRector: tries to set static property to readonly
4 participants