代码之家  ›  专栏  ›  技术社区  ›  Developer

未找到类“Doctrine\Common\Cache\ArrayCache”

  •  1
  • Developer  · 技术社区  · 10 年前

    我从备份中复制symfony2应用程序。我删除缓存并尝试编写器安装或编写器更新-获取错误

    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"
            }
        }
    }
    

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

    3 回复  |  直到 10 年前
        1
  •  8
  •   Elorfin    10 年前

    我们在恢复一个备份时发生了同样的错误。

    在我们的自动备份中,有一条规则不包括symfony cache 目录规则权限过大,源文件夹 vendor/doctrine/cache 也被排除在外。

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

    这解决了我们的问题。

        2
  •  0
  •   websky    10 年前

    可能手动尝试删除缓存文件夹

    或尝试

    php app/console cache:clear --env=prod --no-debug
    php app/console cache:clear --env=dev --no-debug
    
        3
  •  0
  •   Петр Стекунов    8 年前

    检查供应商/原则/缓存目录。

    它不应该是空的