-
Notifications
You must be signed in to change notification settings - Fork 155
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
When using winzouStateMachineBundle 0.4, the old named services are aliases, so need to be marked public as well #178
Conversation
@@ -39,9 +38,12 @@ public function process(ContainerBuilder $container): void | |||
$container->setAlias('sm.callback.cascade_transition', CascadeTransitionCallback::class); |
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.
IMHO this should be changed to just like(tested the current proposal & it didn't work for me):
$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); |
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.
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\Factory
Compared 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.
We have to fix the main build before we can go anywhere further. |
…liases, so need to be marked public as well
Rebased & added a functional test for these services accessibility. |
Thank you, Michael! 🥇 |
In winzouStateMachineBundle 0.4, the
sm.factory
,sm.callback_factory
, andsm.callback.cascade_transition
IDs 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.