PHP Fatal error: Class 'Twig\\Extension\\AbstractExtension' not found

冷暖自知 提交于 2019-12-24 17:29:47

问题


I've tried updating Symfony to v2.8.* today.

I have this error:

Fatal error: Class 'Twig\Extension\AbstractExtension' not found

Please help

Here my composer 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"
},

Thanks


回答1:


It happened to me when I aborted composer install. Clearing cache didn't help, but here's how I managed to make it work:

  • remove all packages in vendor
  • run composer install


来源:https://stackoverflow.com/questions/48341742/php-fatal-error-class-twig-extension-abstractextension-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!