【发布时间】:2015-10-21 23:11:46
【问题描述】:
问题:Get 无法解析有效 composer.json 的版本约束。
我有 /srv/www/site/api/composer.json 和 /srv/www/site/frontend/composer.json。目录 /srv/www/site/api/ 和 /srv/www/site/frontend/ 中没有 composer.lock 或 vendor/
Api composer.json 和前端 composer.json 包含相同的文本:
{
"minimum-stability": "stable",
"require":
{
"doctrine/dbal": "*"
},
"autoload":
{
"psr-4":
{
"app\\": "./"
}
}
}
首先。我跑。
cd /srv/www/site/api
composer install
并得到结果。好的。
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing doctrine/lexer (v1.0.1)
Loading from cache
- Installing doctrine/annotations (v1.2.7)
Loading from cache
- Installing doctrine/cache (v1.4.2)
Loading from cache
- Installing doctrine/collections (v1.3.0)
Loading from cache
- Installing doctrine/inflector (v1.0.1)
Loading from cache
- Installing doctrine/common (v2.5.1)
Loading from cache
- Installing doctrine/dbal (v2.5.2)
Loading from cache
doctrine/dbal suggests installing symfony/console (For helpful console commands such as SQL execution and import of files.)
Generating autoload files
noopic@WhiteBear:/srv/www/dev.laronet.ee/api$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
第二。我跑。
cd /srv/www/site/frontend
composer install
并得到结果。错误。
[UnexpectedValueException]
Could not parse version constraint >: Invalid version string ""
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [packages1] ... [packagesN]
如何解决?这是错误还是我的失败?
作曲家版本 f85d965732d9505b69242a070dc0b381c9f6bbab
【问题讨论】:
标签: composer-php