如何使用symfony component routing entotation route



我在"模块"部分中的Prestashop管理面板中获取了follllow错误,该错误不允许我配置任何模块。

启用" sensio_framework_extra.router.annotations"的配置是自5.2版以来的弃用。将其设置为false,并使用Symfony本身的" Symfony Component Routing Annotation Route Route"注释。隐藏上下文显示跟踪

[▼
  "exception" => SilencedErrorContext {#5077 ▼
    +count: 1
    -severity: E_USER_DEPRECATED
    trace: {▼
      /home/desigssq/public_html/new17/vendor/sensio/framework-extra-bundle/DependencyInjection/SensioFrameworkExtraExtension.php:41 {▼
        › if ($config['router']['annotations']) {
        ›     @trigger_error(sprintf('Enabling the "sensio_framework_extra.router.annotations" configuration is deprecated since version 5.2. Set it to false and use the "%s" annotation from Symfony itself.', SymfonyComponentRoutingAnnotationRoute::class), E_USER_DEPRECATED);
        › 
      }
      /home/desigssq/public_html/new17/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php:71 {▼
        › 
        ›     $extension->load($config, $tmpContainer);
        › } catch (Exception $e) {
      }
    }
  }
]

将以下行添加到您的config.yml文件:

sensio_framework_extra:
    router:
         annotations: false

最新更新