Skip to content

Conversation

@samsonasik
Copy link
Member

  • Register Override and SensitiveParameter to skipped attributes on DowngradeAttributeToAnnotationRector
  • If it on single line, it make new lined so it marked as "comments"
-    public function run(#[\SensitiveParameter] bool $param) {
+    public function run(#[\SensitiveParameter]
+ bool $param) 

Fixes rectorphp/rector#9355

…attributes on DowngradeAttributeToAnnotationRector
@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @kkmuffme

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit c90948d into main Sep 8, 2025
6 checks passed
@samsonasik samsonasik deleted the override-sensitive branch September 8, 2025 07:08
@samsonasik
Copy link
Member Author

It seems cause error on downgrade

Parse error: rector-prefixed-downgraded/vendor/illuminate/contracts/Hashing/Hasher.php:30
    28|      * @return bool
    29|      */
  > 30|     public function check(#[\SensitiveParameter] $value, $hashedValue, array $options = []);
    31|     /**
    32|      * Check if the given hash has been hashed using the given options.
Unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE)

see https://github.com/rectorphp/rector-src/actions/runs/17532914306/job/49817300076#step:14:70

I will temporary revert and try to create a better patch, probably due to some reprinting/override method use.

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 DowngradeAttributeToAnnotationRector

2 participants