Closed fliespl closed 6 years ago
Hello, Thanks for reporting this issue.
I believe that this exception was triggered from the controller.
I will have a look to a clean solution during the week.
As a quick fix, you can alter the workflow.registry
service definition, and make it public (using a compiler pass).
Yes, I have already done that :)
Just mentioned this issue in case you were not aware.
My solution:
<?php
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
class Kernel extends BaseKernel implements CompilerPassInterface
{
use MicroKernelTrait;
public function process(ContainerBuilder $container)
{
$container->getDefinition('workflow.registry')->setPublic(true);
}
...
}
@fliespl could you give a try to the fix :
composer require yokai/sonata-workflow:dev-issue.1-work.with.private.service.in.controller@dev
Please note that the README was updated. (Your controller must now be declared as a service).
No feedback provided, just merged the PR, and released as v0.1.1
The "workflow.registry" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.