1

I copy symfony2 app from backup. I remove cache and try composer install or composer update - get error

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.

here is my 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":  "[email protected]:grekpg/meacorebundle.git"
        },{
            "type": "vcs",
            "url":  "[email protected]:grekpg/meainvoicebundle.git"
        },{
            "type": "vcs",
            "url":  "[email protected]:grekpg/emailer.git"
        },{
            "type": "vcs",
            "url":  "[email protected]: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"
        }
    }
}

any idea how to fix this app ?

0

3 Answers 3

8

We had the same error while restoring one of our backup.

In our automated backup, there was a rule to not include the symfony cache directory. The rule was too permissive and the source folder vendor/doctrine/cache has been excluded too.

Check in your vendor dir if source files are here and restore them if not.

This has fixed our problem.

Sign up to request clarification or add additional context in comments.

Comments

0

maybe manually try to delete the cache folder

or try

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

Comments

0

Check vendor/doctrine/cache directory.

It should not be empty

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.