-
-
Notifications
You must be signed in to change notification settings - Fork 14
[Doc] Wrong hint about Symfony 3.3 #81
Comments
Hi @FELICITUS, SF 3.3 implements autowiring from the work that has been done on DunglasActionBundle. This means it should do exactly what you expect: having services injected into class constructors, without having to define them. However, DunglasActionBundle was not imported as-is, thus the configuration node To configure which directories should be included or excluded from autowiring, everything is now in your new If you already had a running app under SF <= 3.3 and then upgraded to 3.3, your You should better have a look at The new Symfony 3.3 Service Configuration Changes Explained, which shows a new Personnally, autowiring now totally works on my app without DunglasActionBundle. the most touchy part was about services that are now However, I'm poking @dunglas now because there's still something missing in the port: with DunglasActionBundle, one could associate a specific interface or base class to a set of tags: # app/config/config.yml
dunglas_action:
directories: ...
tags:
'My\Custom\Interface\To\Auto\Tag':
- 'my_custom.tag'
- [ 'my_custom.tag_with_attributes', { attribute: 'value' } ] How can we now achieve this without the bundle? SF docs correctly mention auto-tagging for built-in tags (console.command, kernel.event_subscriber, etc) but nothing for custom ones. Any ideas? Thanks, |
@bpolaszek you can use the |
Magical. Didn't notice the |
The README.md file states:
However, I find this not to be true. When upgrading to Sf3.3 and removing this bundle, any actions I have defined now stopped working, even with
autowiring
enabled. The root cause is that no services are passed to the class constructors anymore, whilst with this bundle, they do.Unfortunately, both the blog and documentation links in that section do not provide information on how to upgrade.
I have 2 questions:
The text was updated successfully, but these errors were encountered: