我在"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中定义:
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").导入的)。
发布于 2018-09-27 19:41:24
如果没有相同的行,尝试添加到config/services.yml:
services:
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']https://stackoverflow.com/questions/52535779
复制相似问题