Closed SerheyDolgushev closed 6 months ago
@denzyldick can you please update the status of this one to "In Progress"?
I just found out that PHP 8.0 supports this attribute #[AllowDynamicProperties].
I don't think there is a way to detect which version of PHP is being scanned. I don't see the need for this attribute. What do you think? Ignoring this attribute should probably be a setting.
This rule is about determining if there are any dynamic properties (even defined) are set for the services. Which is problematic for Swoole. I will provide more details later, but it is a bit different to AllowDynamicProperties
attribute.
@denzyldick I have just pushed https://github.com/SerheyDolgushev/php-shared-memory-model it describes the problem that I want to solve with this new rule. Basically, when you migrate to Swoole/RoadRunner you need to get rid of "properties set in the services" (not sure what is the best name for such properties). I used Symfony as a simple example, but it is reproducible in other use-cases.
Implemented in https://github.com/denzyldick/phanalist/pull/51
Detect services that update their properties dynamically. It should be useful for swoole updates.