gpt4 book ai didi

php - 弃用 symfony 解决方案

转载 作者:行者123 更新时间:2023-12-04 00:59:44 24 4
gpt4 key购买 nike

将symfony更新到4.4版后如何解决这个问题

[2020-01-03 08:46:27] php.INFO: User Deprecated: The "twig.exception_listener" service is deprecated since Symfony 4.4. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"twig.exception_listener\" service is deprecated since Symfony 4.4. at /var/www/api/var/cache/prod/Container8sfHI7P/getTwig_ExceptionListenerService.php:9)"} []
[2020-01-03 08:46:27] php.INFO: User Deprecated: The "Symfony\Component\HttpKernel\EventListener\ExceptionListener" class is deprecated since Symfony 4.4, use "ErrorListener" instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener\" class is deprecated since Symfony 4.4, use \"ErrorListener\" instead. at /var/www/api/vendor/symfony/http-kernel/EventListener/ExceptionListener.php:25)"} []
[2020-01-02 05:28:12] php.INFO: User Deprecated: Auto-injection of the container for "\App\Controller\InstallController" is deprecated since Symfony 4.2. Configure it as a service instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Auto-injection of the container for \"\\App\\Controller\\InstallController\" is deprecated since Symfony 4.2. Configure it as a service instead. at /var/www/api/vendor/symfony/framework-bundle/Controller/ControllerResolver.php:64)"} []

最佳答案

我发现这个问题也很难解决。它不会由 Composer 更新自动解决,因为它是仅从 recipe 应用的配置的一部分。当您第一次需要一个包裹时。

您必须更改 4.4 的默认配置中也更改的三项内容(我使用下面的点表示嵌套键):

  • config/packages/twig.yaml添加 twig.exception_controller: null
  • config/routes/dev/twig.yaml更改 _errors.resource@FrameworkBundle/Resources/config/routing/errors.xml
  • 重命名 config/routes/dev/twig.yamlconfig/routes/dev/framework.yaml
  • 关于php - 弃用 symfony 解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59581560/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com