-
Notifications
You must be signed in to change notification settings - Fork 3
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
Generate smarter loader #25
Comments
I'm not sure I fully understand. What is the issue with adjusting loader file? Also, just to see the errors, I think you can delete just contents of the single baseline (to maintain result cache usage). |
Sure, that also works, but it's more work. With the finder method, it automatically works when you remove the file. Just an idea. And as long as the files are there, the result cache is also the same. |
I dont feel implementing that directly, sorry. The only support for this I can imagine is to add some support for custom BaselineHandler, possibly via some |
Ok, thanks. For now, I can do it easily like this:
$files = Finder::create()
->files()
->name('*.php')
->sortByName()
->in(__DIR__ . '/src-dev/PHPStan/config')
->notName('baseline-loader.php');
return [
'includes' => [
...array_values(array_map(fn ($file) => $file->getRealPath(), iterator_to_array($files))),
], |
I think one of the use cases for this package is to be able to work on a single problem (error identifier) at a time.
My ideal workflow would be to be able to delete a specific error identifier baseline and then run PHPStan.
Then see the errors, click the line where the error is happening, and fix it one by one.
But there is one problem with this: you also have to edit the loader.php file.
It would be great if the loader.php would read all the files in the directory automatically, and load them.
Something like this:
For now, I can solve this by not using the generated loader.php file, and manually include the baselines.
But it might be good to support this here too.
The text was updated successfully, but these errors were encountered: