-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
[8.2] make AddAllowDynamicPropertiesAttributeRector configurable #1391
[8.2] make AddAllowDynamicPropertiesAttributeRector configurable #1391
Conversation
.../Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector/config/configured_rule.php
Show resolved
Hide resolved
@@ -7,5 +7,10 @@ | |||
|
|||
return static function (ContainerConfigurator $containerConfigurator): void { | |||
$services = $containerConfigurator->services(); | |||
$services->set(AddAllowDynamicPropertiesAttributeRector::class); | |||
$services->set(AddAllowDynamicPropertiesAttributeRector::class) |
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.
please add 1 more test class with no config to fallback to change all classes, even without namespace
rules/Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector.php
Outdated
Show resolved
Hide resolved
->call('configure', [[ | ||
AddAllowDynamicPropertiesAttributeRector::TRANSFORM_ON_NAMESPACES => [ | ||
'*\Fixture\Process\*' | ||
] | ||
]]); |
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.
can be changed to:
->call('configure', [[ | |
AddAllowDynamicPropertiesAttributeRector::TRANSFORM_ON_NAMESPACES => [ | |
'*\Fixture\Process\*' | |
] | |
]]); | |
->configure( | |
[ | |
'*\Fixture\Process\*' | |
] | |
); |
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.
We should have probably PHPStan rule for this one 👍
9f68afa
to
c5e362c
Compare
Thanks again 👏 👍 |
Per the talk in #1225 this expands on that by making it configurable for namespaces.