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

Cover specs with PHPStan #10059

Merged
merged 6 commits into from
Jan 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Setup spec paths in autoload-dev in the main package
  • Loading branch information
pamil committed Dec 31, 2018
commit 7913eeb3c99f2ec41f6db68762ad87f41afe7115
52 changes: 51 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,57 @@
},
"autoload-dev": {
"psr-4": {
"Sylius\\Tests\\": "tests/"
"Sylius\\Tests\\": "tests/",
"spec\\Sylius\\Behat\\": "src/Sylius/Behat/spec/",
"spec\\Sylius\\Component\\Addressing\\": "src/Sylius/Component/Addressing/spec/",
"spec\\Sylius\\Component\\Attribute\\": "src/Sylius/Component/Attribute/spec/",
"spec\\Sylius\\Component\\Channel\\": "src/Sylius/Component/Channel/spec/",
"spec\\Sylius\\Component\\Core\\": "src/Sylius/Component/Core/spec/",
"spec\\Sylius\\Component\\Currency\\": "src/Sylius/Component/Currency/spec/",
"spec\\Sylius\\Component\\Customer\\": "src/Sylius/Component/Customer/spec/",
"spec\\Sylius\\Component\\Grid\\": "src/Sylius/Component/Grid/spec/",
"spec\\Sylius\\Component\\Inventory\\": "src/Sylius/Component/Inventory/spec/",
"spec\\Sylius\\Component\\Locale\\": "src/Sylius/Component/Locale/spec/",
"spec\\Sylius\\Component\\Mailer\\": "src/Sylius/Component/Mailer/spec/",
"spec\\Sylius\\Component\\Order\\": "src/Sylius/Component/Order/spec/",
"spec\\Sylius\\Component\\Payment\\": "src/Sylius/Component/Payment/spec/",
"spec\\Sylius\\Component\\Product\\": "src/Sylius/Component/Product/spec/",
"spec\\Sylius\\Component\\Promotion\\": "src/Sylius/Component/Promotion/spec/",
"spec\\Sylius\\Component\\Registry\\": "src/Sylius/Component/Registry/spec/",
"spec\\Sylius\\Component\\Resource\\": "src/Sylius/Component/Resource/spec/",
"spec\\Sylius\\Component\\Review\\": "src/Sylius/Component/Review/spec/",
"spec\\Sylius\\Component\\Shipping\\": "src/Sylius/Component/Shipping/spec/",
"spec\\Sylius\\Component\\Taxation\\": "src/Sylius/Component/Taxation/spec/",
"spec\\Sylius\\Component\\Taxonomy\\": "src/Sylius/Component/Taxonomy/spec/",
"spec\\Sylius\\Component\\User\\": "src/Sylius/Component/User/spec/",
"spec\\Sylius\\Bundle\\AddressingBundle\\": "src/Sylius/Bundle/AddressingBundle/spec/",
"spec\\Sylius\\Bundle\\AdminApiBundle\\": "src/Sylius/Bundle/AdminApiBundle/spec/",
"spec\\Sylius\\Bundle\\AdminBundle\\": "src/Sylius/Bundle/AdminBundle/spec/",
"spec\\Sylius\\Bundle\\AttributeBundle\\": "src/Sylius/Bundle/AttributeBundle/spec/",
"spec\\Sylius\\Bundle\\ChannelBundle\\": "src/Sylius/Bundle/ChannelBundle/spec/",
"spec\\Sylius\\Bundle\\CoreBundle\\": "src/Sylius/Bundle/CoreBundle/spec/",
"spec\\Sylius\\Bundle\\CurrencyBundle\\": "src/Sylius/Bundle/CurrencyBundle/spec/",
"spec\\Sylius\\Bundle\\CustomerBundle\\": "src/Sylius/Bundle/CustomerBundle/spec/",
"spec\\Sylius\\Bundle\\FixturesBundle\\": "src/Sylius/Bundle/FixturesBundle/spec/",
"spec\\Sylius\\Bundle\\GridBundle\\": "src/Sylius/Bundle/GridBundle/spec/",
"spec\\Sylius\\Bundle\\InventoryBundle\\": "src/Sylius/Bundle/InventoryBundle/spec/",
"spec\\Sylius\\Bundle\\LocaleBundle\\": "src/Sylius/Bundle/LocaleBundle/spec/",
"spec\\Sylius\\Bundle\\MailerBundle\\": "src/Sylius/Bundle/MailerBundle/spec/",
"spec\\Sylius\\Bundle\\MoneyBundle\\": "src/Sylius/Bundle/MoneyBundle/spec/",
"spec\\Sylius\\Bundle\\OrderBundle\\": "src/Sylius/Bundle/OrderBundle/spec/",
"spec\\Sylius\\Bundle\\PaymentBundle\\": "src/Sylius/Bundle/PaymentBundle/spec/",
"spec\\Sylius\\Bundle\\PayumBundle\\": "src/Sylius/Bundle/PayumBundle/spec/",
"spec\\Sylius\\Bundle\\ProductBundle\\": "src/Sylius/Bundle/ProductBundle/spec/",
"spec\\Sylius\\Bundle\\PromotionBundle\\": "src/Sylius/Bundle/PromotionBundle/spec/",
"spec\\Sylius\\Bundle\\ResourceBundle\\": "src/Sylius/Bundle/ResourceBundle/spec/",
"spec\\Sylius\\Bundle\\ReviewBundle\\": "src/Sylius/Bundle/ReviewBundle/spec/",
"spec\\Sylius\\Bundle\\ShippingBundle\\": "src/Sylius/Bundle/ShippingBundle",
"spec\\Sylius\\Bundle\\ShopBundle\\": "src/Sylius/Bundle/ShopBundle/spec/",
"spec\\Sylius\\Bundle\\TaxationBundle\\": "src/Sylius/Bundle/TaxationBundle/spec/",
"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/"
Copy link
Contributor

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

Copy link
Contributor Author

@pamil pamil Jan 2, 2019

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! :)

Copy link
Contributor

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.

},
"classmap": ["app/AppKernel.php", "app/AppCache.php", "app/TestAppKernel.php"]
},
Expand Down