Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 批注不存在,或无法在Symfony中自动加载_Php_Symfony - Fatal编程技术网

Php 批注不存在,或无法在Symfony中自动加载

Php 批注不存在,或无法在Symfony中自动加载,php,symfony,Php,Symfony,当我将Smfony从2.7版本升级到3.2版本时,我遇到了一个我不一定理解的问题。我已经升级了我的composer.json中的所有依赖项,以便在symfony更新之后使用。所有依赖项都安装得很好,但是当我进入脚本部分(即清空缓存并安装资产)时,我会遇到这个错误 Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache PHP Fatal error: Uncaught exception 'Doctrine\Com

当我将Smfony从2.7版本升级到3.2版本时,我遇到了一个我不一定理解的问题。我已经升级了我的
composer.json
中的所有依赖项,以便在symfony更新之后使用。所有依赖项都安装得很好,但是当我进入脚本部分(即清空缓存并安装资产)时,我会遇到这个错误

Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
PHP Fatal error:  Uncaught exception 'Doctrine\Common\Annotations\AnnotationException' with message '[Semantical Error] The annotation "@Hello\ReleasesBundle\Entity\Package" in class Ubiflow\ReleasesBundle\Controller\PackageController does not exist, or could not be auto-loaded.' in /home/web/gestionnaire/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:54
我通过添加供应商提供的
autoload.php
文件和删除
bootstrap.cache
更改了这些文件,就像一些Symfony升级教程(app/console、app/AppCache、app/phpunit.xml.dist、web/app.php、web/app_dev.php)中所说的那样

这是
composer.json

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-4": { "": "src/" },
        "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
    },
    "require": {
        "php": ">=5.5.9",
        "symfony/symfony": "3.2.*",
        "symfony/assetic-bundle": "2.7.*",
        "symfony/swiftmailer-bundle": "^2.3.10",
        "symfony/monolog-bundle": "^3.0.2",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/doctrine-cache-bundle": "^1.2",
        "doctrine/orm": "^2.5",
        "doctrine/doctrine-migrations-bundle": "1.1.*",
        "twig/extensions": "1.3.*",
        "twig/twig": "^1.0||^2.0",
        "sensio/distribution-bundle": "^5.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "sensio/generator-bundle": "3.0.*",
        "jms/security-extra-bundle": "1.6.*",
        "jms/serializer-bundle": "1.1.*",
        "knplabs/knp-menu-bundle": "2.1.*",
        "knplabs/knp-paginator-bundle": "2.5.*",
        "friendsofsymfony/jsrouting-bundle": "2.0.*",
        "friendsofsymfony/rest-bundle": "1.7.*",
        "brazilianfriendsofsymfony/twig-extensions-bundle": "dev-master",
        "kbsali/redmine-api": "1.5.*",
        "circle/doctrine-rest-driver": "1.2.2"
    },
    "scripts": {
        "symfony-scripts": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-install-cmd": [
            "@symfony-scripts"
        ],
        "post-update-cmd": [
            "@symfony-scripts"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "sort-packages": true,
    "minimum-stability": "alpha",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "branch-alias": {
            "dev-master": "3.2-dev"
        }
    }
}

Hello\ReleasesBundle
是您项目中的一个内部捆绑包吗?确切地说……。您可能忘记了使用批注加载程序。
Hello\ReleasesBundle
是您项目中的一个内部捆绑包吗?确切地说……。您可能忘记了使用批注加载程序。