Symfony 4.2 - How to decorate the UrlGenerator

后端 未结 3 1357
失恋的感觉
失恋的感觉 2021-01-05 14:52

I want to decorate the Symfony UrlGenerator class.

Symfony\\Component\\Routing\\Generator\\UrlGenerator: ~

my.url_generator:
    class: AppBund         


        
3条回答
  •  猫巷女王i
    2021-01-05 14:55

    I believe you have to decorate the Symfony\Component\Routing\Generator\UrlGeneratorInterface, because the services should depend on the interface and not on a specific implementation (class).

提交回复
热议问题