While I'm upgrading Smfony from the 2.7 version to 3.2 I am faced with a problem that I do not necessarily understand. I've upgraded all the dependencies in my composer.json
For this to follow the symfony update. All of the dependencies install fine, but when I get to the scripting part (ie empty the cache and install assets) I'm getting this error
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
I've changed those files by adding the autoload.php
file from the vendor and deleting the bootstrap.cache
like is said in some Symfony upgrade tutorials (app/console, app/AppCache, app/phpunit.xml.dist,web/app.php,web/app_dev.php)
And this is the 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"
}
}
}