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

Use an AST to validate use statements #15

Open
nusje2000 opened this issue Jun 6, 2020 · 0 comments
Open

Use an AST to validate use statements #15

nusje2000 opened this issue Jun 6, 2020 · 0 comments

Comments

@nusje2000
Copy link
Owner

nusje2000 commented Jun 6, 2020

nusje2000/phpstan-monolith uses PHP Stan to validate use statements in source code based on the composer.json, but this currently has a few limitations:

  • It is build with PHP Stan so the error's cannot be fixed automatically with an autofixer
  • PHP Stan is significantly slower when using the extension
  • Errors can be confusing to read since one missing package can lead to hundreds of errors
  • Due to the caching that phpstan uses, updating the composer.json will not resolve the errors because the cached errors are shown

This should not be difficult to achieve using the nikic/PHP-Parser package.

This should also come with a feature to generate a baseline for the errors that occur to be fixed later.

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

Successfully merging a pull request may close this issue.

1 participant