When using winzouStateMachineBundle 0.4, the old named services are aliases, so need to be marked public as well#178
Merged
Conversation
lchrusciel
approved these changes
Sep 1, 2020
stloyd
approved these changes
Sep 2, 2020
stloyd
suggested changes
Sep 2, 2020
| @@ -39,9 +38,12 @@ public function process(ContainerBuilder $container): void | |||
| $container->setAlias('sm.callback.cascade_transition', CascadeTransitionCallback::class); | |||
Contributor
There was a problem hiding this comment.
IMHO this should be changed to just like(tested the current proposal & it didn't work for me):
Suggested change
| $container->setAlias('sm.callback.cascade_transition', CascadeTransitionCallback::class); | |
| $container->setAlias('sm.factory', FactoryInterface::class)->setPublic(true); | |
| $container->setAlias('sm.callback_factory', CallbackFactoryInterface::class)->setPublic(true); | |
| $container->setAlias('sm.callback.cascade_transition', CascadeTransitionCallback::class)->setPublic(true); |
Contributor
Author
There was a problem hiding this comment.
PR seems fine as is for me, this is coming out of my local Sylius clone with my WIP upgrade PR applied:
Michaels-MacBook-Pro-2:Sylius mbabker$ bin/console debug:container sm.factory
// This service is a public alias for the service SM\Factory\FactoryCompared to the current state of affairs:
Michaels-MacBook-Pro-2:Sylius mbabker$ bin/console debug:container sm.factory
// This service is a private alias for the service SM\Factory\Factory
... snip ...
! [NOTE] The "sm.factory" service or alias has been removed or inlined when the container was compiled.
Contributor
|
We have to fix the main build before we can go anywhere further. |
Closed
…liases, so need to be marked public as well
Contributor
|
Rebased & added a functional test for these services accessibility. |
Contributor
|
Thank you, Michael! 🥇 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In winzouStateMachineBundle 0.4, the
sm.factory,sm.callback_factory, andsm.callback.cascade_transitionIDs are aliases and not real services. So, the aliases need to be made public as well otherwise they won't be available through the container once it's compiled.