Closed TheCelavi closed 8 years ago
I have investigated service container, forms are registered as service, but it seams that they are not registered with form.type tag..?
False alarm - me being stupid, again, nothing new...
Hi @TheCelavi
Yes forms are registered as services since #224
And yes they are tagged: https://github.com/symfony2admingenerator/GeneratorBundle/blob/master/DependencyInjection/AdmingeneratorGeneratorExtension.php#L280
Which is awesome!
But it is a BC break, because previously we got the instances in Controller, so we injected into instances additional services, if needed.
This is not something HUGE to make it compatible, however, it is a BC break.
Seriously, you should REALY consider having BC break list :)
I have to fork this, at least I can contribute with documentation...
Actually, until now, the bundle was not under a "stable" release, and many BC Breaks have been made to be 2.8+ compliant, and not all of them have been identified, that's true, and I'm sorry for that. But going to a stable release was a priority.
Now we started to release the bundle, we'll take care about BC Breaks.
Documentation is a WIP, any help is welcome :)
BC break introduced, here is an example:
in vendor/symfony2admingenerator/generator-bundle/Resources/templates/CommonAdmin/NewAction/NewBuilderAction.php.twig
So if generator.yml uses authorisation checker, we get null pointer exception.
That means that every type should be registered to service container with setter method for required dependency.
Maybe this can be optimised to avoid boilerplate?