首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Sylius覆盖SecurityController

Sylius覆盖SecurityController
EN

Stack Overflow用户
提问于 2018-09-27 11:19:59
回答 1查看 111关注 0票数 0

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

代码语言:javascript
复制
services:
   sylius.controller.security:
        class: AppBundle\Controller\Ui\SecurityController

现在,我得到了一个错误:

(2/2)当从资源导入服务“././src/AppBundle/*”时,希望在文件"/home/ftdev/host/shopex/b2c/unicef/src/AppBundle/Controller/Ui/SecurityController.php“中找到类"AppBundle\Controller\Ui\SecurityController”,但没有找到!检查与/home/ftdev/host/shopex/b2c/unicef/app/config/services.yml中的资源一起使用的命名空间前缀(它是从"/home/ftdev/host/shopex/b2c/unicef/app/config/config.yml").导入的)。

EN

回答 1

Stack Overflow用户

发布于 2018-09-27 19:41:24

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

代码语言:javascript
复制
services:
    App\Controller\:
        resource: '../src/Controller'
        tags: ['controller.service_arguments']
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52535779

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档