Symfony2 - 添加另一个自定义 Symfony2 项目作为供应商



我有两个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 应用程序内核.php

    new SciForumJournalsReviewSciForumJournalsReviewBundle(),
    

当试图做

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.

知道吗?谢谢。

我没有使用自定义供应商,而是将此自定义捆绑包作为辅助捆绑包包含在我的主项目中,并且一切运行良好。

相关内容

  • 没有找到相关文章

最新更新