ServiceNotFoundException:依赖于不存在的服务";树枝"



我有这个错误:

服务"fos_ck_editor.renderer"依赖于一个不存在的服务"trick"。

app/config/config.yml:中的我的框架配置

framework:
#esi: ~
#translator: { fallbacks: ['%locale%'] }
secret: '%secret%'
router:
resource: '%kernel.project_dir%/app/config/routing.yml'
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
default_locale: '%locale%'
trusted_hosts: ~
session:
# https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
handler_id: session.handler.native_file
save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
fragments: ~
http_method_override: true
assets:
version: 13
version_format: '%%s?v%%s'
php_errors:
log: true
templating:
engines: ['twig']

app/config/admin/config.yml中的我的树枝配置

twig:
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
form_themes:
- '@AppyfuriousFiles/Form/fields.html.twig'
- '@Admin/fields.html.twig'
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'

我发现了问题的根源:

在我的AppKernel.php中,我添加了通用(应用程序(环境:

$bundles[] = new FOSCKEditorBundleFOSCKEditorBundle();

但我只将它添加到了管理环境admin_prodadmin_devadmin_test中。因为每当我向API发送请求时,我都不需要这个捆绑包和ServiceNotFoundException。我希望,我的解释很清楚。。。

最新更新