Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Upcoming sf 2.3 compatibility #427

Closed
mvrhov opened this Issue · 7 comments

6 participants

@mvrhov

I'm starting a new project with what will be a sf 2.3 and I'm getting.

[Symfony\Component\DependencyInjection\Exception\ScopeCrossingInjectionException]
Scope Crossing Injection detected: The definition "fos_rest.request.param_fetcher" references the service "fos_rest.request.param_fetcher.reader" which belongs to another scope hierarchy. This service might not be available consistently. Generally, it is safer to either move the definition "fos_rest.request.param_fetcher" to scope "container", or declare "request" as a child scope of "container". If you can be sure that the other scope is always active, you can set the reference to strict=false to get rid of this error.

IMO, we could add strict=false to this definition, but I'm not sure as I don't know the bundle that well.

@stof
Owner

This looks like a bug in Symfony. The container scope should be considered as parent of any scope.

@mvrhov mvrhov referenced this issue in symfony/symfony
Merged

[2.3] [WIP] Synchronized services... #7007

2 of 2 tasks complete
@lsmith77 lsmith77 closed this
@conradfr

So, is there a way to make it work with the current Symfony 2.3 branch ?

@lsmith77
Owner

the issue hasnt been solved in core yet? /cc @fabpot

@fabpot

That's because the request scope is now created by the ContainerAwareHttpKernel instead of FrameworkBundle. So, at the time the compilation occurs, the request scope does not exist yet. See symfony/symfony@550df5a

@fabpot

see symfony/symfony@853f681 for the fix.

@fabpot

I've checked and this issue is now gone.

@venu

:+1: yes, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.