-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Store baseline and neon configs as php code #8870
Comments
Sorry, I don't think we can do anything to improve working with such a huge baseline. The documentation (https://phpstan.org/user-guide/baseline) states:
I recommend you to trim down the baseline. Even if you keep such a big baseline, taking 11s isn't that bad. |
Good news: |
Thanks! |
@ondrejmirtes Thanks for this new feature! I've just tried it out, and the performance improvement is great. 🎉 I do have some smalls suggestions for improvements regarding the "code style" of the generated file :
|
@gnutix you might want to follow phpstan/phpstan-src#2266 :) |
Fixed in phpstan/phpstan-src#2269
Fixed in phpstan/phpstan-src@144da80 (pending release)
Fixed in phpstan/phpstan-src@c9b5060 (pending release) |
Thanks @ruudk for your work! I like the "one line per error" idea too. Will make things was more compact, and even git stats (line removed) will match errors count somewhat. :) |
@gnutix Please respond in that PR, seems it's not going to be merged 😊 |
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. |
Feature request
I'm requesting to store the baseline file in php code instead of neon format.
Using php code, we could also use opcache in cli with file_cache_only.
Our baseline is 167k loc with 8M in size.
When analyzing an empty php file, it takes 11s with the baseline.neon and 2s without the baseline.neon, so parsing the baseline takes about 8s on an amd 5825U.
Same for the rules.neon files. We use a couple of neon files in the "includes". When I include all configs, parsing an empty php file takes 11s, when I disable all in the include section, it takes 2s.
Did PHPStan help you today? Did it make you happy in any way?
Yes, PHPStan is helping us every day, great tool!
The text was updated successfully, but these errors were encountered: