Upcoming sf 2.3 compatibility #427

Closed
mvrhov opened this Issue Apr 8, 2013 · 7 comments

Comments

Projects
None yet
6 participants
Contributor

mvrhov commented Apr 8, 2013

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.

Owner

stof commented Apr 12, 2013

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 Apr 12, 2013

Merged

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

2 of 2 tasks complete

@lsmith77 lsmith77 closed this May 3, 2013

conradfr commented May 7, 2013

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

Owner

lsmith77 commented May 7, 2013

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

Contributor

fabpot commented May 9, 2013

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

Contributor

fabpot commented May 9, 2013

see symfony/symfony@853f681 for the fix.

Contributor

fabpot commented May 9, 2013

I've checked and this issue is now gone.

venu commented May 9, 2013

👍 yes, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment