我在Debian服务器上全局安装了composer
~$ which composer
/usr/local/bin/composer
它可以工作,得到更新,我将它用于三个不同的(Symfony)网站。
~$ composer self-update
You are already using composer version 1.3.3 (stable channel).
但是,当我在其中一个站点的目录中,并尝试更新所有依赖项时,我收到一个错误(之前,这只是工作并更新了供应商等)。
~/website-path$ ls composer.*
composer.json composer.lock
~/website-path$ composer update
[ErrorException]
Illegal string offset 'version'
~/website-path$ composer
[ErrorException]
Illegal string offset 'version'
当我重命名composer.json时,这个错误消失了(但缺少.json文件会使这个无用)
这里出了什么问题,我该如何解决?
答案 0 :(得分:0)
通过升级到1.4.0
,这个问题在一夜之间神奇地消失了~$ composer -V
Composer version 1.4.0 2017-03-08 17:51:24
~/website-path$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
[...]