Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
shared = false attribute to services configuration to fix symfony >= 2.8 issue #26
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
referenced this pull request
Mar 16, 2016
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.
@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".
Ok... Gimme some time, I will first change the build matrix to test it