Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums OroCommerce The service "… " has a dependency on a non-existent

This topic contains 4 replies, has 3 voices, and was last updated by  Guillaume Deneux 2 weeks, 6 days ago.

  • Creator
    Topic
  • #37517

    Guillaume Deneux
    Participant

    Hello
    I am trying to overload the service: oro_rfp.form.type.request
    I followed the documentation: https://symfony.com/doc/2.8/service_container/service_decoration.html
    But I have the following error that appears when clearing the cache:
    I don’t understand what i have to do.

    Thank you for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #37518
    Michael
    Michael
    Keymaster

    “By convention, the old app.mailer service is renamed to app.decorating_mailer.inner, so you can inject it into your new service.” – they meant that the original service becomes available as NEW_SERVICE_ID.inner, or in your case custom_rfp.decorating_rfp_request_decorator.inner

    #37533

    Guillaume Deneux
    Participant

    I thought I tried it. Thank you!
    So now I have :

    La classe :

    But now I have the following error:

    The type name specified for the service “oro_rfp.form.type.frontend_request” does not match the actual name. Expected “Oro\Bundle\RFPBundle\Form\Type\Frontend\RequestType”, given “Custom\RFPBundle\Form\Type\Frontend\DecoratingRequestType”

    Do you have an idea of the problem ? I spent several hours without success ..

    #37543
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Form types should not be decorated like regular services.
    Instead, it’s recommended to use form type extensions where you can update the original form type
    https://symfony.com/doc/2.8/form/create_form_type_extension.html

    #37546

    Guillaume Deneux
    Participant

    Great, that’s what I needed, it works, thank you!

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No
sso for www.magecore.comsso for oroinc.comsso for oroinc.desso for oroinc.frsso for marketplace.orocommerce.comsso for marketplace.orocrm.com