8

调用时我的部署失败:

cd /var/www/prod/releases/20130513164742 && php app/console assetic:dump --env=prod --no-debug

昨天我的设置运行良好,但今天我无法使用cap deploy通过在我的 prod 环境中克隆 repo 并执行检查的命令来部署它php app/console assetic:dump --env=prod --no-debug(在开发模式下)检查的命令来部署它,并且运行良好!

任何想法 ?

 ** [out :: prod] executing "sh -c 'cd /var/www/prod/releases/20130513164742 && php app/console assetic:dump --env=prod --no-debug'"
 ** [out :: prod] PHP Deprecated:  getEntityManager is deprecated since Symfony 2.1. Use getManager instead in /var/www/prod/shared/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Registry.php on line 71
 ** [out :: prod] Dumping all prod assets.
 ** [out :: prod] Debug mode is off.
 ** [out :: prod] 
 ** [out :: prod] 
 ** [out :: prod] 
 ** [out :: prod]                                                                 
 ** [out :: prod]   [ReflectionException]                                         
 ** [out :: prod]   Method Assetic\AssetWriter::getCombinations() does not exist  
 ** [out :: prod]                                                                 
 ** [out :: prod] 
 ** [out :: prod] 
 ** [out :: prod] assetic:dump [--watch] [--force] [--period="..."] [write_to]
 ** [out :: prod] 
 ** [out :: prod] 

编辑:

在我的 git clone 上更新供应商后,我收到此错误

www-data@Prod:~/prod/dev$ php app/console assetic:dump --env=prod --no-debug
PHP Catchable fatal error:  Argument 2 passed to Doctrine\Bundle\DoctrineBundle\ManagerConfigurator::__construct() must be an array, none given, called in /var/www/prod/dev/app/cache/prod/appProdProjectContainer.php on line 116 and defined in /var/www/prod/dev/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/ManagerConfigurator.php on line 35
4

2 回答 2

19

https://github.com/kriswallsmith/assetic/issues/412

添加"kriswallsmith/assetic": "v1.1.0-alpha4",

到您的 composer.json 文件,然后再次更新

当他们解决问题时,您需要更改此设置

编辑:

为了记录,"symfony/symfony": "2.3.*"现在开始工作,没有指定上述内容

于 2013-05-13T17:33:43.733 回答
5

如果有人在添加后仍然有问题:

kriswallsmith/assetic": "v1.1.0-alpha4

可能您需要将版本更改为symfony/assetic-bundle2.3.*我有2.1)并再次更新:

php composer.phar 更新

于 2013-05-14T09:38:24.017 回答