質問

SilverStripeモジュール「Sheadawson / SilverStripe-Blocks Dev-Master」を使用したい。Composerでインストールすると、MultivalueFieldなどのようなモジュールをインストールする必要がありました。私はそれらを問題なくインストールしました。次の端末出力を取得します。

Pascal@Nemesis:~/Sites/xyz$ composer require sheadawson/silverstripe-blocks dev-master
./composer.json has been updated
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
- Installation request for silverstripe/cms 1.0.0 -> satisfiable by silverstripe/cms[1.0.0].
- sheadawson/silverstripe-blocks dev-master requires silverstripe/cms 3.1.* -> satisfiable by silverstripe/cms[3.1.0, 3.1.1, 3.1.2].
- Can only install one of: silverstripe/cms[3.1.0, 1.0.0].
- Can only install one of: silverstripe/cms[3.1.1, 1.0.0].
- Can only install one of: silverstripe/cms[3.1.2, 1.0.0].
- Installation request for sheadawson/silverstripe-blocks dev-master -> satisfiable by sheadawson/silverstripe-blocks[dev-master].
.

私は3.1。*依存関係は3つの可能なバージョンをもたらすことができる。しかし、私はこのバージョンへの依存関係がどこにもないので、CMSの1.0.0バージョンは私に少し絡み合っています。

でバージョン3.1.2をインストールしたいとき
composer require silverstripe/cms 3.1.2
.

次の出力を取得します。

Pascal@Nemesis:~/Sites/xyz$ composer require silverstripe/cms 3.1.2
./composer.json has been updated
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
- Installation request for silverstripe/cms 1.0.0 -> satisfiable by silverstripe/cms[1.0.0].
- Can only install one of: silverstripe/cms[3.1.2, 1.0.0].
- Installation request for silverstripe/cms 3.1.2 -> satisfiable by silverstripe/cms[3.1.2].
.

my 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",
        "ajshort/silverstripe-gridfieldextensions": "dev-master",
        "silverstripe/multivaluefield": "dev-master"
    }
}
.

誰もがComposerのバージョン1.0.0をインストールしたい理由も知っていますか?Composer.JSONの清掃、composer.jock、composerのアップデート、そして私の心にやって来たすべてのものを削除して、すでにすべてのモジュールを削除しようとしました。

役に立ちましたか?

解決

あなたのソフトウェアからではなく、そのCMSからのファイルであるように見えます。

それがそうであれば、その作曲家が混乱していることを驚かせません。そのcomposer.jsonでは、 "SilverStripe / CMS"がソフトウェアであると述べています。そして、ソフトウェアがバージョン1.0.0としてタグ付けされた場合は、「SilverStripe / CMS 1.0.0」を作成しました - より高いバージョンを必要とする必要なソフトウェアは今動作できません。

一般に、Composerの使用を開始すると、ソフトウェアのメインディレクトリにcomposer initを実行してから、対話的にあなたのソフトウェアに関するいくつかの質問に答えてください。

最も基本的な場合は、空のファイルcomposer.jsonを作成し、一対の中括弧を追加してから、「必要な」キーと必要なソフトウェアを入力します。

あなたがしないべきもの:すべての問題を修正せずに他の誰かからcomposer.jsonをコピーします。私はあなたの現在のバージョンをつかむために何をしたのかわかりませんが、私はあなたがおそらくあなたのプロジェクトを始めるようにいくつかのリポジトリを複製したと思います。それは完全に間違っていません - しかし、誰かがそのワークフローを改善するべきでは、作曲家と悩まされないようにするべきです。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top