0

私は 2 つの symfony2 プロジェクト A と B を持っています。私の目標は、プロジェクト B をプロジェクト A にベンダーとして追加することです。

私がしたこと:

  1. A プロジェクトの composer.lock ファイルを編集して、プロジェクト B をベンダーとして含めます。

    "name": "sciforum/journals_revie_bundle",
        "version": "dev-master",
        "target-dir": "SciForum/JournalsReview",
        "source": {
            "type": "git",
            "url": "ssh://git@dev.mdpi.lab:22/~/projects/journals_review",
            "reference": "dc8ea6a551e5d42b972dd302b75d9ce0a26735f3"
        },
        "require": {
            "php": ">=5.3.3"
        },
        "type": "symfony-bundle",
        "extra": {
            "branch-alias": {
                "dev-master": "2.0-dev"
            }
        },
        "autoload": {
            "psr-0": {
                "SciForum\\JournalsReview\\": ""
            }
        },
        "description": "SciForumJournalsReview",
        "homepage": "http://www.sciforum.net",
        "time": "2014-11-14 11:11:33"
    },
    
  2. プロジェクト B の composer.json を変更

    {
    "name" : "sciforum/journals_review_bundle",
    "type" : "symfony-bundle",
    "description" : "SciForumJournalsReviewBundle",
    "homepage" : "http://www.sciforum.net",
    "require" : {
        "php" : ">=5.3.3"
    },
    "  autoload" : {
      "psr-0" : {
            "SciForum\\JournalsReviewBundle\\" : ""
        }
    },
    "target-dir" : "SciForum/JournalsReviewBundle",
    "extra" : {
        "branch-alias" : {
            "dev-master" : "2.0-dev"
        }
    }
    

    }

  3. プロジェクト A AppKernel.php にバンドルをインポートしました

    new SciForum\JournalsReview\SciForumJournalsReviewBundle(),
    

そしてやろうとすると

sudo php composer.phar install

私は得ています

Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package sciforum/journals_review_bundle could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package sciforum/journals_revie_bundle could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
 see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

何か案が?ありがとうございました。

4

1 に答える 1

0

カスタム ベンダーを使用する代わりに、このカスタム バンドルをメイン プロジェクトのセカンダリ バンドルとして含めたところ、すべてが完全に機能しました。

于 2014-11-24T09:16:39.517 に答える