-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Cover specs with PHPStan #10059
Cover specs with PHPStan #10059
Conversation
"spec\\Sylius\\Bundle\\TaxonomyBundle\\": "src/Sylius/Bundle/TaxonomyBundle/spec/", | ||
"spec\\Sylius\\Bundle\\ThemeBundle\\": "src/Sylius/Bundle/ThemeBundle/spec/", | ||
"spec\\Sylius\\Bundle\\UiBundle\\": "src/Sylius/Bundle/UiBundle/spec/", | ||
"spec\\Sylius\\Bundle\\UserBundle\\": "src/Sylius/Bundle/UserBundle/spec/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These repeated autoloads can be very hard to maintain and keep completed.
For monorepo and autoload-dev
, the post autoload script might be sustainable solution: deprecated-packages/symplify@4d9ed30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a pretty nice idea, but I think I prefer explicit configuration within composer.json
to implicit one done by some PHP code which almost no one expects. Our list of components and bundles is quite stable, so maintenance won't be an issue here. Thanks for the heads up! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure :)
Since it's monorepo and this removes the maintenance completely, I see the values in clear composer.json
overrulling the lost explicitnes.
I got some feedback that monorepo autoloads are pretty WTF, compared to single psr-4 lines.
Tried to add
proget-hq/phpstan-phpspec
to our PHPStan but ended up reporting proget-hq/phpstan-phpspec#8 and covering our specs with PHPStan and some ignored errors.This led me to find over ten specs which were not run due to class name/namespace/filename mismatches and some wrong
Argument::
calls in specs.