调用时我的部署失败:
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
答案 0 :(得分:19)
https://github.com/kriswallsmith/assetic/issues/412
添加"kriswallsmith/assetic": "v1.1.0-alpha4"
,
到你的composer.json文件,然后再次更新
您需要在解决问题时更改此问题
修改强> 的
对于记录,移至"symfony/symfony": "2.3.*"
现在可以正常工作,而无需指定上述
答案 1 :(得分:5)
如果有人在添加后仍有问题:
kriswallsmith/assetic": "v1.1.0-alpha4
可能您需要将symfony/assetic-bundle
的版本更改为2.3.*
(我有2.1
)
并再次更新:
php composer.phar update