我最近更新的Symfony從2.1到2.2,現在我得到錯誤:錯誤「類‘Twig_SimpleFunction’找不到」升級後的Symfony 2.2
錯誤:類「Twig_SimpleFunction」在供應商/ symfony中未找到/ symfony中/ src目錄/ Symfony的/包/ SecurityBundle /嫩枝/分機/ LogoutUrlExtension.php線41
我composer.json:
...
"require": {
"php": ">=5.4",
"symfony/symfony": "2.2.*",
"twig/twig": "1.11.x",
"twig/extensions": "1.0.x-dev",
"noetix/easy-csv": "dev-master",
"symfony/assetic-bundle": "2.*",
"symfony/swiftmailer-bundle": "2.*",
"symfony/monolog-bundle": "2.*",
"sensio/distribution-bundle": "2.*",
"sensio/framework-extra-bundle": "2.*",
"sensio/generator-bundle": "2.*",
"jms/security-extra-bundle": "1.4.*",
"jms/di-extra-bundle": "1.3.*",
"jms/serializer": "0.12.*",
"jms/serializer-bundle" : "0.12.*@dev",
"jms/metadata" : "1.3.*",
"friendsofsymfony/user-bundle": "patch-1-dev",
"friendsofsymfony/jsrouting-bundle": "1.2.*",
"propel/propel1": ">=1.6.7",
"propel/propel-bundle": "1.2.x-dev",
"willdurand/propel-typehintable-behavior": "dev-master",
"pagerfanta/pagerfanta": "1.0.x-dev",
"white-october/pagerfanta-bundle": "dev-master",
"knplabs/knp-menu-bundle": "dev-master",
"knplabs/knp-menu": "2.0.x-dev",
"exercise/elastica-bundle": "dev-master",
"gregwar/captcha-bundle": "dev-master",
"nelmio/api-doc-bundle": "2.1.*",
"fr3d/ldap-bundle": "2.0.*@dev",
"conjecto/easyrdf-bundle": "dev-master"
},
...
Twig deprecated features page說: 「作爲嫩枝1.x中,請使用Twig_SimpleFunction」。我有1.11,所以我不明白我做錯了什麼。
你可以接受這個答案,使這個問題看起來像解決。 – martias