Skip to content
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

PHPStan: Make sure all transients and options are delete once the plugin is uninstall #7131

Open
CrochetFeve0251 opened this issue Nov 21, 2024 · 0 comments

Comments

@CrochetFeve0251
Copy link
Contributor

CrochetFeve0251 commented Nov 21, 2024

Is your feature request related to a problem? Please describe.
Today we are still missing some transients and options while uninstalling.
Describe the solution you'd like
The idea would be to create a rule to catch them and raise an error.

For that we will have not to create a rule but a phpstan collector: https://phpstan.org/developing-extensions/collectors

That collector would do two things:

  • When it encounter the creation or the update of an option or a transient it will save it to process it when it gonna encounter the uninstall method.

  • Once it encounters the uninstall method it feeds its state with the transients and options we delete there and raise error for all the potentially missing ones we did encounter in the past or we will encounter in the future.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant