Class 'Doctrine\Common\Cache\ArrayCache' 未找到

Class 'Doctrine\Common\Cache\ArrayCache' not found

我从备份中复制了 symfony2 应用程序。我删除缓存并尝试 composer install 或 composer update - 出现错误

PHP Fatal error:  Class 'Doctrine\Common\Cache\ArrayCache' not found in /home/div/app/cache/dev/appDevDebugProjectContainer.php on line 1033
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception

[RuntimeException]                                                         
  An error occurred when executing the "'cache:clear --no-warmup'" command.

这是我的 composer.json

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" ,  "mea":"vendor/Mea/CoreBundle/"}
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.5.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~2.3",
        "sensio/framework-extra-bundle": "~3.0",
        "sensio/generator-bundle": "~2.3",

        "jbafford/password-strength-bundle": "dev-master",

        "friendsofsymfony/user-bundle": "2.0.*@dev",

        "weotch/phpthumb": "dev-master",
        "meenie/javascript-packer": "dev-master",
        "natxet/CssMin": "dev-master",
        "apy/datagrid-bundle": "dev-master",

        "zetacomponents/mail": "dev-master",

        "egeloen/ckeditor-bundle": "2.2.*@dev",

        "instaclick/translation-editor-bundle": "dev-master",

        "endroid/qrcode": "1.*@dev",

        "whiteoctober/tcpdf-bundle": "dev-master",

        "ddeboer/data-import": "dev-master",

        "payum/payum-bundle": "*@stable",
        "payum/paypal-express-checkout-nvp": "*@stable",

        "simplethings/entity-audit-bundle": "0.*@dev",

        "twilio/sdk": "dev-master",

        "vich/uploader-bundle": "1.0.*@dev",

        "astina/social-links-bundle":"dev-master",

        "Mea/CoreBundle": "dev-master",
        "Mea/InvoiceBundle": "dev-master",
        "Mea/PostBoxBundle": "dev-master",
        "Mea/Emailer": "dev-master",

        "incenteev/composer-parameter-handler": "~2.0"
    },
    "repositories": [
        {
            "type": "vcs",
            "url":  "git@bitbucket.org:grekpg/meacorebundle.git"
        },{
            "type": "vcs",
            "url":  "git@bitbucket.org:grekpg/meainvoicebundle.git"
        },{
            "type": "vcs",
            "url":  "git@bitbucket.org:grekpg/emailer.git"
        },{
            "type": "vcs",
            "url":  "git@bitbucket.org:grekpg/postboxbundle.git"
        }
    ],
    "scripts": {
        "post-install-cmd": [
            "Incenteev\ParameterHandler\ScriptHandler::buildParameters",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Incenteev\ParameterHandler\ScriptHandler::buildParameters",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
            "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "symlink",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.4-dev"
        }
    }
}

知道如何修复这个应用程序吗?

也许可以手动尝试删除缓存文件夹

或尝试

php app/console cache:clear --env=prod --no-debug
php app/console cache:clear --env=dev --no-debug

我们在恢复我们的备份之一时遇到了同样的错误。

在我们的自动备份中,有一条规则不包含 symfony cache 目录。该规则过于宽松,源文件夹 vendor/doctrine/cache 也已被排除。

如果源文件在这里,请检查您的供应商目录,如果没有,请恢复它们。

这已经解决了我们的问题。

检查 vendor/doctrine/cache 目录。

不能为空