wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
702 stars 219 forks source link

PHPStan - Discourage Direct Container Calls within `register` method from providers #7128

Open CrochetFeve0251 opened 5 days ago

CrochetFeve0251 commented 5 days ago

The problem was described here: https://github.com/wp-media/wp-rocket/issues/6550 Describe the solution you'd like We need to create a custom PHPStan rule to detect this kind of usage.

A similar rule was created inside Launchpad but it is not adapted to WP Rocket syntax: https://github.com/wp-launchpad/launchpad-phpstan/blob/main/src/PerformanceRule.php

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.