8000 "You have requested a synthetic service ("request")." after updating from 2.8.9 to 2.8.10 · Issue #19840 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

"You have requested a synthetic service ("request")." after updating from 2.8.9 to 2.8.10 #19840

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

Closed
briancoit opened this issue Sep 3, 2016 · 14 comments

Comments

@briancoit
Copy link
briancoit commented Sep 3, 2016

After updating from 2.8.9 to 2.8.10 I experience the following exception for any request. Downgrading again resolves the issue. No other composer dependencies were updated in the process.

RuntimeException in appDevDebugProjectContainer.php line 7425:
You have requested a synthetic service ("request"). The DIC does not know how to construct this service.
in appDevDebugProjectContainer.php line 7425
at appDevDebugProjectContainer->getRequestService() in bootstrap.php.cache line 2221
at Container->get('request', '2') in appDevDebugProjectContainer.php line 10835
at appDevDebugProjectContainer->synchronizeRequestService() in bootstrap.php.cache line 2157
at Container->set('request', null, 'request') in bootstrap.php.cache line 3360
at ContainerAwareHttpKernel->handle(object(Request), '1', true) in bootstrap.php.cache line 2535
at Kernel->handle(object(Request)) in app_dev.php line 28

This might be related to #19825 and also feels like a BC break.

@javiereguiluz
Copy link
Member

@briancoit thanks for reporting this issue. Indeed it looks the same problem as #19825. Could you please investigate a bit further the origin of the error to help us discover its cause?

In some of the lines of the appDevDebugProjectContainer.php file mentioned in the stack trace, you'll see the PHP method that originates this wrong call. Could you please check which is the service that makes it? Thanks!

@liverbool
Copy link
Contributor

@javiereguiluz here is error point on my project (cmf media bundle).

    /**
     * Updates the 'request' service.
     */
    protected function synchronizeRequestService()
    {
        if ($this->initialized('cmf_media.persistence.phpcr.subscriber.imagine_cache')) {
            $this->get('cmf_media.persistence.phpcr.subscriber.imagine_cache')->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));
        }
        if ($this->initialized('cmf_routing.dynamic_router')) {
            $this->get('cmf_routing.dynamic_router')->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));
        }
    }
<service id="cmf_media.persistence.phpcr.subscriber.imagine_cache" class="%cmf_media.persistence.phpcr.subscriber.imagine_cache.class%">
    <tag name="doctrine_phpcr.event_subscriber" />
    <argument type="service" id="cmf_media.persistence.phpcr.manager" />
    <argument type="service" id="liip_imagine.cache.manager" />
    <argument>%cmf_media.imagine.all_filters%</argument>
    <call method="setRequest"><argument type="service" id="request" on-invalid="null" strict="false"/></call>
</service>

@dmaicher
Copy link
Contributor
dmaicher commented Sep 4, 2016

I have the same issue since updating to 2.8.10:

RuntimeException in appDevDebugProjectContainer.php line 10179: You have requested a synthetic service ("request"). The DIC does not know how to construct this service.

    in appDevDebugProjectContainer.php line 10179
    at appDevDebugProjectContainer->getRequestService() in bootstrap.php.cache line 2221
    at Container->get('request') in appDevDebugProjectContainer.php line 12787
    at appDevDebugProjectContainer->synchronizeRequestService() in bootstrap.php.cache line 2157
    at Container->set('request', null, 'request') in bootstrap.php.cache line 3360
    at ContainerAwareHttpKernel->handle(object(Request), '1', true) in bootstrap.php.cache line 2535
    at Kernel->handle(object(Request)) in app.php line 42

Seems to be coming from this bundle that I use:

https://github.com/craue/CraueFormFlowBundle/blob/2.1.9/Resources/config/form_flow.xml#L28

Method synchronizeRequestService in appDevDebugProjectContainer.php:

    /**
     * Updates the 'request' service.
     */
    protected function synchronizeRequestService()
    {
        if ($this->initialized('craue.form.flow')) {
            $this->get('craue.form.flow')->setRequest($this->get('request'));
        }
        if ($this->initialized('ca.form.flow.review_form')) {
            $this->get('ca.form.flow.review_form')->setRequest($this->get('request'));
        }
    }

Line 12787 is:

            $this->get('ca.form.flow.review_form')->setRequest($this->get('request'));

Service definition of ca.form.flow.review_form (left out some details marked with ...):

    ca.form.flow.review_form:
        class: ...
        parent: "craue.form.flow"
        scope: "request"
        arguments:
            - "@translator"
        calls:
            - ["setFormType", ["@..."]]

@dmaicher
Copy link
Contributor
dmaicher commented Sep 4, 2016

This PR introduced the BC break: #19689

@nicolas-grekas
Copy link
Member

See #19847

@codeliner
Copy link

Same here: worked locally on an app with Sf 2.8.9 but test system pulled 2.8.10 and 💥

@AienTech
Copy link
AienTech commented Sep 4, 2016

same happened here, composer.json:

    "symfony/symfony": "^2.8",
    "doctrine/orm": "^2.5",
    "doctrine/doctrine-bundle": "^1.6",
    "symfony/swiftmailer-bundle": "^2.3",
    "symfony/monolog-bundle": "^2.11",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0",
    "incenteev/composer-parameter-handler": "^2.1",
    "friendsofsymfony/user-bundle": "^1.3",
    "knplabs/knp-menu-bundle": "^2.1",
    "knplabs/knp-paginator-bundle": "^2.5",
    "mopa/bootstrap-bundle": "^3.0",
    "twbs/bootstrap": "^3.3",
    "craue/formflow-bundle": "^2.1",
    "genemu/form-bundle": "^2.3",
    "sensio/generator-bundle": "^3.0",
    "sonata-project/core-bundle": "^3.0",
    "sonata-project/admin-bundle": "^3.3",
    "sonata-project/user-bundle": "^3.0",
    "sonata-project/easy-extends-bundle": "^2.1",
    "sonata-project/block-bundle": "^3.0",
    "sonata-project/doctrine-orm-admin-bundle": "^3.0",
    "sonata-project/cache-bundle": "^2.2",
    "sonata-project/seo-bundle": "^2.0",
    "sonata-project/notification-bundle": "^3.0",
    "symfony-cmf/routing-bundle": "^1.4",
    "sonata-project/datagrid-bundle": "^2.2",
    "mohebifar/date-time-bundle": "dev-master",
    "jms/serializer-bundle": "^1.1",
    "knplabs/knp-snappy-bundle": "^1.4",
    "friendsofsymfony/jsrouting-bundle": "^1.6",
    "ob/highcharts-bundle": "^1.4",
    "friendsofsymfony/rest-bundle": "^1.8",
    "sonata-project/intl-bundle": "^2.2",
    "vich/uploader-bundle": "^0.14.0",
    "hackzilla/barcode-bundle": "^2.0",
    "sonata-project/media-bundle": "^3.0",
    "tilleuls/acl-sonata-admin-extension-bundle": "dev-master",
    "videlalvaro/php-amqplib": "^2.6",
    "liip/monitor-bundle": "^2.3",
    "nelmio/api-doc-bundle": "dev-master",
    "cocur/slugify": "^1.4",
    "lexik/jwt-authentication-bundle": "^1.3"

@bartosz-malec
Copy link

Same here, downgrade to 2.8.9 solved problem.

@XWB
Copy link
Contributor
XWB commented Sep 5, 2016

Same here.

1 similar comment
@COil
Copy link
Contributor
COil commented Sep 5, 2016

Same here.

@sebastianlp
Copy link

Same here

1 similar comment
@abdessamad
Copy link
abdessamad commented Sep 5, 2016

Same here

@xrow
Copy link
xrow commented Sep 5, 2016

Same here. Using 2.7.17.

@fabpot
Copy link
Member
fabpot commented Sep 5, 2016

I think we don't need any more "same here", we've heard you and we actually have some PR to fix it :)

@fabpot fabpot closed this as completed Sep 5, 2016
@symfony symfony locked and limited conversation to collaborators Sep 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

0