-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.3][DIC] ContainerBuilder behaviour issue #7636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Refs #7007 I believe this is related. |
@fabpot - I dont know if this is helpful, but I've found I've found a the point that triggers this error in the fragment handler service definition - if I change the setRequest part to null, the exception is not thrown. Is there any reason this should trigger the exception when the cache warmers run, but only when the compiled kernel base class is set to |
@Drak: thanks for the help. I can now reproduce the issue and I know why it behaves like that. That's a bug and I'm going to provide a fix soon. |
This PR was merged into the master branch. Discussion ---------- [DependencyInjection] fixed management of scoped services with an invalid behavior set to null | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7636 | License | MIT | Doc PR | n/a Commits ------- edd7649 [DependencyInjection] fixed management of scoped services with an invalid behavior set to null (closes #7636)
Sorry for the late reply. The PR fixes that particular exception. Thanks! |
I'm also experiencing a similar bug with Symfony 2.2.3 (I had to move back to 2.2.2) php app/console -v cache:clear [Symfony\Component\DependencyInjection\Exception\InactiveScopeException] Exception trace: |
Since upgrading from Symfony 2.2 to 2.3, I think I might have exposed a change in behaviour that might be a bug.
Background
We made a small change to our kernel to compile the DIC with
ContainerBuilder
so that we can still add definitions to the DIC after compile. It simply means one cannot overwrite existing services after compile (which I consider a feature). In any case, it worked in 2.2 and there was no reason for it not to.Since upgrading to 2.3, if I run
app/console clear:cache
I get a weird exception about the request service. However, if I runapp/console cache:clear --no-warmup
, then I get no exception. Please see my commit for details of the small change.I believe the problem comes in with the new "syncronized" services code that was added.
@beberlei @fabpot
I have no idea why only the cache warmers trigger this error and my application continues to work from the browser.
The text was updated successfully, but these errors were encountered: