【问题标题】:Sylius Overwrite SecurityControllerSylius 覆盖安全控制器
【发布时间】:2019-03-03 07:08:01
【问题描述】:

我在"vendor\sylius\sylius\src\Sylius\Bundle\UiBundle\Controller\SecurityController.php" 中找到了SecurityController ,不,我在"src\AppBundle\Controller\Ui" 中覆盖它并在 app\config\services.yml 中定义:

services:
   sylius.controller.security:
        class: AppBundle\Controller\Ui\SecurityController

现在,我收到此错误:

(2/2) FileLoaderLoadException 从资源“../ ../src/AppBundle/*”,但是没有找到!检查与 /home/ftdev/host/shopex/b2c/unicef/app/config/services.yml 中的资源一起使用的命名空间前缀(从“/home/ftdev/host/shopex/b2c/unicef/app”导入/config/config.yml")。

【问题讨论】:

    标签: overwrite sylius


    【解决方案1】:

    尝试添加到 config/services.yml,如果没有相同的行:

    services:
        App\Controller\:
            resource: '../src/Controller'
            tags: ['controller.service_arguments']
    

    【讨论】:

      猜你喜欢
      • 2015-08-16
      • 2017-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-09
      • 1970-01-01
      相关资源
      最近更新 更多