phpstan / phpstan-symfony

Symfony extension for PHPStan
MIT License
698 stars 89 forks source link

[Feature Request] Enforce `ResetInterface` on non-read-only services #380

Closed priyadi closed 6 months ago

priyadi commented 6 months ago

I'm proposing this rule: if a class is in the container, then it must either be read-only/immutable, or implement ResetInterface.

This rule will help to ensure our code is ready for worker mode (Swoole, FrankenPHP, RoadRunner, etc).

ondrejmirtes commented 6 months ago

Hello, this is too opinionated because traditional apps don't need it.

But you can always implement a custom rule (and even publish it as your own package) 😊

github-actions[bot] commented 5 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.