wp-media / wp-rocket

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

PHPStan: Ensure no hooks are present inside the ORM logic #7125

Closed CrochetFeve0251 closed 1 day ago

CrochetFeve0251 commented 1 week ago

Is your feature request related to a problem? Please describe. Currently there is no way to warn a developer going against the convention of not putting any hook inside ORMs. Describe the solution you'd like We need a custom PHPStan rule detecting the usage of filters and actions inside the classes extending BerlinDB queries classes.

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.