-
-
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
[DX] Services autoconfiguration with PHP8 Attributes and Interfaces #14154
[DX] Services autoconfiguration with PHP8 Attributes and Interfaces #14154
Conversation
…ture services using it + added tests.
…on for future services using it + added tests.
…for future services using it + added tests.
…ion for future services using it + added tests.
…n for future services using it + added tests.
… for future services using it + added tests.
…on for future services using it + added tests.
… for future services using it + added tests.
…tion for future services using it + added tests.
…ion for future services using it + added tests.
… autoconfiguration for future services using it + added tests.
…ansformerInterface + tests.
136c3c3
to
2793f1f
Compare
Hello @ffouillet 👋🏼! If you would like, you can rebase this PR and target it against I just wanted to let you know your work won't be gone, and I believe we'll see this feature in the Sylius soon :D. |
Hello @ffouillet 👋🏼 Thanks for starting this initiative! |
Hi @jakubtobiasz, I'm glad the work I initiated will be used in Sylius :). Thanks for having set me as a co-author in the new PR! |
…e (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 8d18081 Provide autoconfiguration with attributes for ApiBundle
…undle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- a8e817d Provide autoconfiguration with attributes for PaymentBundle
…dle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 8bb6655 Provide autoconfiguration with attributes for PayumBundle
…le (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 3e025ca Provide autoconfiguration with attributes for CoreBundle
…ndle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 2e04d4c Provide autoconfiguration with attributes for LocaleBundle
…Bundle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 2830ff8 Provide autoconfiguration with attributes for CurrencyBundle
…dle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 0a26e7a Improve autoconfiguration with attributes for OrderBundle
…undle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 2d2247a Improve autoconfiguration with attributes for ProductBundle
…Bundle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- c9ce032 Provide autoconfiguration with attributes for TaxationBundle
…Bundle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- b41b4bc Provide autoconfiguration with attributes for ShippingBundle
…nBundle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 56901d3 Provide autoconfiguration with attributes for PromotionBundle
…eBundle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 223cada Provide autoconfiguration with attributes for AttributeBundle
…undle (jakubtobiasz) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #14154 | License | MIT Thanks @ffouillet for starting this initiative 🥳! Commits ------- 3c2f26a Provide autoconfiguration with attributes for ChannelBundle 0342759 Rename AsChannelContextRequestResolver.php to AsRequestBasedChannelResolver.php
This feature aims to improve developer experience by allowing to autoconfigure custom services on every bundle where possible thanks to interfaces and PHP8 Attributes.
Custom services reference services that can be created on top of Sylius extension points.
For example: A custom service implementing
ChannelContextInterface
should now not need anymore to be declared in services.yaml thanks to autoconfiguration.During bundle loading :
ChannelContext
) that do not require arguments could be autoconfigured directly by implementing the right interface.TaxCalculatorInterface
) that do require arguments should be tagged with PHP8 Attributes so that Attributes parameters can be used as service tag attributes.Concerned bundles :
Some documentation have also been added, not on every bundle.
Feel free to let me know where I can write more doc about the concerned services if necessary ;) !
Many thanks in advance for your reviews 🙂.
A huge thank you to @HeahDude who has motivated me to contribute and took of his time to help and support me through the whole process of the creation of this feature. Thank you 🙏 !!