我以前从未升级过SilverStripe项目,所以如果我错过了什么明显的东西,请原谅我。
我想升级这个3.0.5 SilverStripe站点我在本地运行到最新版本(这是3.1.6或类似的东西)。我更新了我的作曲家。Json文件(位于[项目名称]/cms/composer.json中)看起来像这样:
{
"name": "silverstripe/cms",
"type": "silverstripe-module",
"description": "The SilverStripe Content Management System",
"homepage": "http://silverstripe.org",
"license": "BSD-3-Clause",
"keywords": ["silverstripe", "cms"],
"authors": [
{
"name": "SilverStripe",
"homepage": "http://silverstripe.com"
},
{
"name": "The SilverStripe Community",
"homepage": "http://silverstripe.org"
}
],
"require": {
"php": ">=5.3.2",
"composer/installers": "*",
"silverstripe/cms": "3.1.*",
"silverstripe/framework": "3.1.*"
},
"autoload": {
"classmap": ["tests/behat/"]
}
}
我还更新了composer本身,因为我在终端上被提示这样做。
我去了作曲家的地方。定位Json文件,在终端运行composer update,得到如下错误:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: silverstripe/cms[3.1.0, dev-master].
- Can only install one of: silverstripe/cms[3.1.1, dev-master].
- Can only install one of: silverstripe/cms[3.1.10, dev-master].
- Can only install one of: silverstripe/cms[3.1.11, dev-master].
- Can only install one of: silverstripe/cms[3.1.12, dev-master].
- Can only install one of: silverstripe/cms[3.1.13, dev-master].
- Can only install one of: silverstripe/cms[3.1.14, dev-master].
- Can only install one of: silverstripe/cms[3.1.15, dev-master].
- Can only install one of: silverstripe/cms[3.1.2, dev-master].
- Can only install one of: silverstripe/cms[3.1.3, dev-master].
- Can only install one of: silverstripe/cms[3.1.4, dev-master].
- Can only install one of: silverstripe/cms[3.1.5, dev-master].
- Can only install one of: silverstripe/cms[3.1.6, dev-master].
- Can only install one of: silverstripe/cms[3.1.7, dev-master].
- Can only install one of: silverstripe/cms[3.1.8, dev-master].
- Can only install one of: silverstripe/cms[3.1.9, dev-master].
- Installation request for silverstripe/cms dev-master -> satisfiable by silverstripe/cms[dev-master].
- Installation request for silverstripe/cms 3.1.* -> satisfiable by silverstripe/cms[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9].
我需要具体到哪个版本的SilverStripe我需要更新到?我没看到作曲家。锁文件在项目中,但我确实删除了一行在web。调用1的配置:
<add segment="composer.lock" />
作曲家应该。Json文件位于项目的其他地方(而不是[项目名称]/cms)?
更新:与composer安装在根目录和一个composer。json文件位于那里,我仍然得到错误时,试图将网站升级到SilverStripe 3.1:
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Updating composer/installers dev-master (v1.0.2 => e420b53)
[RuntimeException]
The .git directory is missing from /Projects/[project name]/vendor/composer/installers, see https://getcomposer.org/commit-deps for more information
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]
~/Projects/[project name] $ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Updating silverstripe/framework (3.0.x-dev 29de643 => 3.1.x-dev 92970f8)
[RuntimeException]
The .git directory is missing from framework/, see https://getcomposer.org/commit-deps for more information
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]
你不应该编辑cms/composer。Json,您应该正在编辑编辑器。Json在你的项目的根(如果有一个存在-可能没有一个编写器)。