Closed igorjacon closed 5 years ago
I don't know if this will help you but I got it working by manually wiring the service in service.yaml as:
services: create.project.flow.type: class: App\Form\ProjectManager\FormFlow\CreateProjectFlowType public: true autowire: false autoconfigure: false parent: craue.form.flow Where the id was one chosen at will and the class location was that of the flow class that extends FormFlow.
And in my controller I did:
$flow = $this->get('create.project.flow.type); //Using the service id $flow->bind($project);
And it worked, beware of this module compatibility with Symfony 4.1 as other issues also come up depending on what are you trying to work on.
Thanks, that worked for me 👍
I don't know if this will help you but I got it working by manually wiring the service in service.yaml as:
services: create.project.flow.type: class: App\Form\ProjectManager\FormFlow\CreateProjectFlowType public: true autowire: false autoconfigure: false parent: craue.form.flow Where the id was one chosen at will and the class location was that of the flow class that extends FormFlow.
And in my controller I did:
$flow = $this->get('create.project.flow.type); //Using the service id $flow->bind($project);
And it worked, beware of this module compatibility with Symfony 4.1 as other issues also come up depending on what are you trying to work on.
Thanks, this helped me out too.
ich think this is also a good solution:
services:
_instanceof:
Craue\FormFlowBundle\Form\FormFlow:
calls:
-
method: setDataManager
arguments: [ '@craue.form.flow.data_manager' ]
-
method: setFormFactory
arguments: [ '@form.factory' ]
-
method: setRequestStack
arguments: [ '@request_stack' ]
-
method: setEventDispatcher
arguments: [ '@event_dispatcher' ]
The latest release (3.1.0) is now fully tested with Symfony 4. Support for autoconfiguration could still be added...
Guys, take a look at #333 please.
Is this bundle compatible with Symfony4.1? I'm having an issue using this bundle with a project on Symfony4.1. Here is my service declaration:
My form extends FormFlow, but when I call the bind method on my form flow
$flow->bind($project);
I get the following error:Can someone help? Thanks