Search code examples
phpjenkinssymfonyassetic

Class Symfony\Bundle\AsseticBundle\AsseticBundle not found


I installed a fresh copy of symfony 3.1.6 on my local machine and i created a simple project and every thing go well but when i created a job on jenkins an launching a build i got this error :

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Class 'Symfony\Bundle\AsseticBundle\AsseticBundle' not found in /var/lib/jenkins/workspace/projectfolder/app/AppKernel.php on line 29

this is my composer file :

"require": {
    "php": ">=5.5.9",
    "symfony/symfony": "3.1.*",
    "doctrine/orm": "^2.5",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/doctrine-cache-bundle": "^1.2",
    "symfony/swiftmailer-bundle": "^2.3",
    "symfony/monolog-bundle": "^2.8",
    "symfony/polyfill-apcu": "^1.0",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "incenteev/composer-parameter-handler": "^2.0",
    "sonata-project/admin-bundle": "^3.9",
    "sonata-project/doctrine-orm-admin-bundle": "^3.1",
    "friendsofsymfony/user-bundle": "~2.0@dev",
    "sonata-project/easy-extends-bundle": "^2.1",
    "sonata-project/classification-bundle": "^3.1",
    "sonata-project/core-bundle": "^3.1",
    "sonata-project/media-bundle": "^3.3",
    "symfony/assetic-bundle": "^2.8"
},

any help? any idea?


Solution

  • The problem is the '.composer' folder is not writable on the server,so i give it 777

    chmod 777 -R .composer
    

    and i resolved the problem !