当我尝试构建CakePHP3 PHP应用程序的Docker容器时,我当前收到此错误:
Loading composer repositories with package information
Updating dependencies (including require-dev)
[RuntimeException]
Could not load package cakephp/migrations in http://repo.packagist.org: [UnexpectedValueException] Could not parse version constraint 0.next-dev: Invalid version string "0.next-dev"
[UnexpectedValueException]
Could not parse version constraint 0.next-dev: Invalid version string "0.next-dev"
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
这是我的composer.json的相关部分:
{
"name": "cakephp/app",
"description": "CakePHP skeleton app",
"type": "project",
"require": {
"php": ">=5.6",
"cakephp/cakephp": "3.5.*",
"mobiledetect/mobiledetectlib": "2.*",
"cakephp/migrations": "1.7.*",
"cakephp/plugin-installer": "*",
"friendsofcake/search": "^2.3",
"josegonzalez/cakephp-version": "1.*",
"google/apiclient": "^2.0",
"friendsofcake/cakephp-csvview": "~3.0",
"alt3/cakephp-swagger": "^2.0.2",
"riesenia/cakephp-duplicatable": "^3.0",
"dakota/cake-excel": "^2.0",
"spomky-labs/jose": "^7.0",
"burzum/cakephp-imagine-plugin": "2.*",
"tightenco/collect": "< 5.7",
"muffin/trash": "^2.1",
"friendsofcake/crud": "^5.4",
"elasticsearch/elasticsearch": "~7.0"
},
"minimum-stability": "dev",
"prefer-stable": true
}
如您所见,migrations
库的版本设置为"1.7.*"
,所以我不知道是什么原因导致此错误。