我在本地机器上安装了一个symfony 3.1.6的新副本,我创建了一个简单的项目,但是当我在jenkins上创建一个工作时,我发现了一个错误:
[RuntimeException的]
执行“'缓存时出错:clear --no-warmup'” 命令:
PHP致命错误:类'Symfony \ Bundle \ AsseticBundle \ AsseticBundle' 找不到 /var/lib/jenkins/workspace/projectfolder/app/AppKernel.php 第29行
这是我的作曲家档案:
"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"
},
任何帮助?任何想法?
答案 0 :(得分:1)
问题是'.composer'文件夹在服务器上是不可写的,所以我给它777
chmod 777 -R .composer
我解决了这个问题!
答案 1 :(得分:0)
在我新的Symfony3项目中,我正在使用资产,而我的composer.json中没有资产包:
"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",
"devio/pipedrive": "^1.0",
"google/recaptcha": "~1.1",
"friendsofsymfony/user-bundle": "~2.0@dev"
},
你的目的是什么?如果您只需要在{{asset()}}模板中使用资源,那么您就不需要此捆绑包。包括它,尝试一下。