gpt4 book ai didi

symfony - 如何修复 symfony2.3 中的 twig 扩展弃用问题

转载 作者:行者123 更新时间:2023-12-02 18:41:29 25 4
gpt4 key购买 nike

DEPRECATION - The Twig_Filter_Method class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.


Called from require() at line 92
Called from DebugClassLoader::loadClass()
Called from spl_autoload_call() at line 42
Called from DoctrineExtension::getFilters() at line 3432
Called from Twig_Environment::initExtension() at line 3426
Called from Twig_Environment::initExtensions() at line 3377
Called from Twig_Environment::getUnaryOperators() at line 371
Called from Twig_Lexer::getOperatorRegex() at line 65

我的 symfony 被弃用了..如何删除这个?...谢谢!

最佳答案

您需要做的就是在 Twig 扩展中找到定义新过滤器的位置,并用新的方式替换已弃用的定义新过滤器的方式。如何执行此操作的一个示例是 https://github.com/schmittjoh/serializer/pull/484/files

关于symfony - 如何修复 symfony2.3 中的 twig 扩展弃用问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34465499/

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