PHP致命错误:Class' Twig \\ Extension \\ AbstractExtension'找不到

时间:2018-01-19 13:01:01

标签: php symfony composer-php

我今天尝试将Symfony更新为v2.8。*。

我有这个错误:

  

致命错误:Class' Twig \ Extension \ AbstractExtension'找不到

请帮忙

我的作曲家json:

"name": "assane/myecomapp",
"license": "proprietary",
"type": "project",
"autoload": {
    "psr-4": {
        "": "src/"
    },
    "classmap": [
        "app/AppKernel.php",
        "app/AppCache.php"
    ]
},
"require": {
    "php": ">=5.3.9",
    "symfony/symfony": "2.8.*",
    "doctrine/orm": "^2.4.8",
    "doctrine/doctrine-bundle": "~1.4",
    "symfony/swiftmailer-bundle": "~2.3,>=2.3.10",
    "symfony/monolog-bundle": "^3.0.2",
    "sensio/distribution-bundle": "~5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/user-bundle": "~2.0@dev",
    "twig/extensions":"*"
},
"require-dev": {
    "sensio/generator-bundle": "~3.0",
    "symfony/phpunit-bridge": "~2.7",
    "doctrine/doctrine-fixtures-bundle": "^2.3"
},

由于

2 个答案:

答案 0 :(得分:1)

当我流产composer install时,发生在我身上。清除缓存没有帮助,但这是我设法使其工作的方式:

  • 删除vendor
  • 中的所有包
  • 运行composer install

答案 1 :(得分:0)

生成的缓存已过期,然后将其删除并刷新网页:

sudo rm -R app/cache/*