Skip to content
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

[2.7.17] You have requested a synthetic service ("request") #19825

Closed
chandon opened this issue Sep 2, 2016 · 7 comments
Closed

[2.7.17] You have requested a synthetic service ("request") #19825

chandon opened this issue Sep 2, 2016 · 7 comments

Comments

@chandon
Copy link

chandon commented Sep 2, 2016

I just have updated from 2.7.16 ot 2.7.17

My project doesn't work anymore (DEV or PROD environment)

RuntimeException in appDevDebugProjectContainer.php line 5493

in appDevDebugProjectContainer.php line 5493
at appDevDebugProjectContainer->getRequestService() in bootstrap.php.cache line 2189
at Container->get('request', '2') in appDevDebugProjectContainer.php line 8559
at appDevDebugProjectContainer->synchronizeRequestService() in bootstrap.php.cache line 2125
at Container->set('request', null, 'request') in bootstrap.php.cache line 3270
at ContainerAwareHttpKernel->handle(object(Request), '1', true) in bootstrap.php.cache line 2479
at Kernel->handle(object(Request)) in app_dev.php line 30

Downgrading to 2.7.16 solves the problem

@chandon
Copy link
Author

chandon commented Sep 2, 2016

Seems that the problem was linked to an external package. Updating the package solves the problem, but this BC seems quite strange (even if the package was faulty)

@scragg0x
Copy link

scragg0x commented Sep 2, 2016

@chandon which package did you have to upgrade?

@chandon
Copy link
Author

chandon commented Sep 3, 2016

@scragg0x It was "suncat/mobile-detect-bundle": "dev-master#d800c7590aac32d72cf05a88334d1f3f312888a6"

I updated it to "suncat/mobile-detect-bundle": "1.*"

@opichon
Copy link

opichon commented Sep 4, 2016

It seems tied to an external package, but how can we find out which one? The error message is cryptic to say the least.

@nicolas-grekas
Copy link
Member

See #19847

@manuelDistefano
Copy link

Downgrade to 2.7.16 solve the problem for me.

@scragg0x
Copy link

scragg0x commented Sep 5, 2016

In my case, downgrading to 2.7.16 did not help me. To find out what is causing the issue, look at the bootstrap.php.cache and look where synchronizeRequestService is being called per the exception. It should have the offending services / 3rd party libs. For me it was monolog with a particular configuration, there is an open issue on their repo on it.

nicolas-grekas added a commit that referenced this issue Sep 6, 2016
…" (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| Tests pass?   | yes
| Fixed tickets | #19689 #19840 #19825 #19857
| License       | MIT
| Doc PR        | -

This reverts commit c89f80a, reversing
changes made to 386e5e7.

See discussion in #19847

I'll try adding test cases soon that ensure that:

- [x] *when not leaving scope* synthetic services always throw and ignore the `ContainerInterface::NULL_ON_INVALID_REFERENCE` flag (on 3.x also)
- [x] *when leaving scope* synthetic services always return null and ignore the `ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE`  (until 2.8 since scopes are gone in 3.x)

Commits
-------

8cb28bf [DI] Add anti-regression test
ac742df Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants