-
Notifications
You must be signed in to change notification settings - Fork 25
shared = false attribute to services configuration to fix symfony >= 2.8 issue #26
base: master
Are you sure you want to change the base?
Conversation
…fix symfony >= 2.8 issue Shared: false attribute on services configuration is necessary because it prevents symfony from sharing the service scope among other classes, it solves an issue on Reflection Factory when two or more bundles add the RegisterJsonSchemasPass compiler on bundle's build method. The scope sharing feature is default in symfony >= 2.8 and need to be disabled manually.
[UPDATE] Added shared = false attribute to services configuration to …
Hey, I need this merge too. When will you accept it and make a release? Or did you abandon this project? |
@gquemener, are there plans to accept or reject? I'm facing the same problem here. |
First of all, thank you! I'm not sure this is compatible with symfony < 2.8 as the build matrix is not testing against different versions of symfony (but only the last one). BTW, I'm no longer part of the Knp organization, and thus can't help you with the merging. Let me ping a few of the folks for you @PedroTroller @docteurklein @AntoineLelaisant @Einenlum and @NiR-, that should do it 🍷 Cheers! |
@gquemener You are right, I just tested the solution on Symfony 2.3 and a exception is thrown:
I think it would need a major release to get this bundle running, but it is in dev mode still, so I suggest a branch called "symfony2.8". |
@gquemener héhé, you don't have an excuse anymore: I just added you as a collaborator :D |
Ok... Gimme some time, I will first change the build matrix to test it
|
So far, I'm still waiting for this release, but seems like I'll have to fork until you accept the merge, because I have my deadlines here. Thanks for replying @gquemener |
Shared: false attribute on services configuration is necessary because it prevents symfony from sharing the service scope among other classes (forcing a new class instance), it solves an issue on Reflection Factory when two or more bundles are added to the RegisterJsonSchemasPass compiler on bundle's build method. The scope sharing feature is default in symfony >= 2.8 and need to be disabled manually.
Note: it fixes #16