首页 > 解决方案 > 拉取代码后的问题 [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]

问题描述

我刚刚在我的产品环境中提取了一些代码。更改很少(我在我的一个 html.twig 页面中添加了一个 {{ form_widget(meeting.text) }}。没有别的。

知道我的服务器何时关闭以及加载页面 app_dev.php 时出现的错误如下:

ParameterNotFoundException in ParameterBag.php line 84:
You have requested a non-existent parameter "kernel.bundles_metadata".

我的代码中没有使用任何 parameterbag.php。我什至找不到!kernel.bundles_metadata 也是一样。我在我的代码中找不到它。

这是完整的错误:


in ParameterBag.php line 84
at ParameterBag->get('kernel.bundles_metadata') in bootstrap.php.cache line 1897
at Container->getParameter('kernel.bundles_metadata') in FrameworkExtension.php line 713
at FrameworkExtension->getValidatorMappingFiles(object(ContainerBuilder)) in FrameworkExtension.php line 665
at FrameworkExtension->registerValidationConfiguration(array('enable_annotations' => true, 'enabled' => true, 'static_method' => array('loadValidatorMetadata'), 'translation_domain' => 'validators', 'strict_email' => false), object(ContainerBuilder), object(XmlFileLoader)) in FrameworkExtension.php line 114
at FrameworkExtension->load(array(array('translator' => array('fallback' => 'en'), 'secret' => '******', 'router' => array('resource' => '/var/www/html/BDLCapital-v3/app/config/routing.yml', 'strict_requirements' => null), 'form' => null, 'csrf_protection' => null, 'validation' => array('enable_annotations' => true), 'templating' => array('engines' => array('twig')), 'default_locale' => 'en', 'trusted_proxies' => null, 'session' => null, 'fragments' => null, 'http_method_override' => true), array('router' => array('resource' => '/var/www/html/myAPP/app/config/routing_dev.yml', 'strict_requirements' => true), 'profiler' => array('only_exceptions' => false))), object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 59
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 39
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in Compiler.php line 102
at Compiler->compile(object(ContainerBuilder)) in ContainerBuilder.php line 568
at ContainerBuilder->compile() in bootstrap.php.cache line 2436
at Kernel->initializeContainer() in bootstrap.php.cache line 2215
at Kernel->boot() in bootstrap.php.cache line 2246
at Kernel->handle(object(Request)) in app_dev.php line 22

如果您有任何想法对我有很大帮助!

我正在使用 symfony 2.7。

编辑:当我尝试执行 sudo php app/console cache:clear 时,我收到以下消息:

  [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
  You have requested a non-existent parameter "kernel.bundles_metadata".

感谢您的帮助

标签: phpsymfony

解决方案


推荐阅读