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

[Maintenance] Require precise packages instead of generic sylius/sylius #982

Open
wants to merge 1 commit into
base: 1.13
Choose a base branch
from

Conversation

lchrusciel
Copy link
Member

I propose switching from the generic "sylius/sylius" dependency to a set of high-level, more explicit ones. Of course, I would like to require "sylius/core-bundle" - as it is the core and heart of Sylius itself. In addition, with this change, we will require:

  • "sylius/admin-bundle"
  • "sylius/shop-bundle"
  • "sylius/api-bundle"

These packages should be considered as a default stack of Sylius at the moment. What is missing from this list? Deprecated admin-api, but that should be considered as a benefit of this change.

In addition what we are earning with it is the fact that if in the future we will add a new layer to Sylius it won't be automatically propagated to all existing shops. Also, we are making it easier for people to turn off one of the accessing layers to Sylius

@lchrusciel lchrusciel requested review from a team as code owners April 29, 2024 11:11
Copy link
Member

@diimpp diimpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't core automatically required by admin, shop, api? Is it necessary to have explicit requirement?

composer.json Outdated
@@ -26,7 +26,10 @@
"require": {
"php": "^8.1",
"sylius/paypal-plugin": "^1.6",
"sylius/sylius": "~1.13.0",
"sylius/core-bundle": "~1.13.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"sylius/core-bundle": "~1.13.0",

Like @diimpp mentioned it, core is already required by shop, admin or api bundle. Then it could be omitted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, yes it is not required. However, I think it is good practice to have explicit composer requirements for the things that you use. Now, we can argue that the same is true for all the other sub-dependencies of sylius/core-bundle. And here I would go pragmatic and just assume that core-bundle is an aggregator for all of them.

To sum up, I guess we would be fine with leaving core-bundle as it is. But removing it will also not change too much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants