overwrite - Sylius 覆盖安全控制器
问题描述
我在中找到 SecurityController "vendor\sylius\sylius\src\Sylius\Bundle\UiBundle\Controller\SecurityController.php"
,不,我将其覆盖"src\AppBundle\Controller\Ui"
并在 app\config\services.yml 中定义:
services:
sylius.controller.security:
class: AppBundle\Controller\Ui\SecurityController
现在,我收到此错误:
(2/2) FileLoaderLoadException 导入服务时,预计在文件“/home/ftdev/host/shopex/b2c/unicef/src/AppBundle/Controller/Ui/SecurityController.php”中找到类“AppBundle\Controller\Ui\SecurityController”来自资源“../../src/AppBundle/*”,但没有找到!检查与 /home/ftdev/host/shopex/b2c/unicef/app/config/services.yml 中的资源一起使用的命名空间前缀(从“/home/ftdev/host/shopex/b2c/unicef/app”导入/config/config.yml”)。
解决方案
如果没有相同的行,请尝试添加到 config/services.yml:
services:
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
推荐阅读
- javascript - 无法在 html 和 css 中正确设置 ul 和 li
- opengl - (openGL) 是否应该避免处理不存在的制服?
- agora.io - 是否可以通过 agora.io 在 Unity(Android、iOS)[不是 1 对 1] 中进行广播?
- c++ - 有没有办法提高涉及 const 表达式的编译速度?
- docker - 如何根据 rabbitmq 队列消息率缩放 k8s pod?
- python - 如何将自定义 css 代码添加到由 python Bokeh、save() 生成的独立 HTML 文件中?
- python - 在列表中生成字符串元素的组合,将它们限制为特定的字符数量
- bash - 如何使用多次出现的相同模式?
- javascript - OnCreate 函数未触发但 OnWrite 函数触发
- android - 安卓可以接IOS蓝牙信号吗