简体   繁体   English

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

[英]Symfony2 - Add another custom Symfony2 project as a vendor

I have two symfony2 projets A and B. My goal is to add the project B into the project A as a vendor. 我有两个symfony2项目A和B。我的目标是将项目B作为供应商添加到项目A中。

What I did: 我做了什么:

  1. Edited the composer.lock file in the A project to include the project B as vendor: 编辑了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. Changed the composer.json in the project B 在项目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. Imported the bundle in the project A AppKernel.php 将捆绑包导入到项目A AppKernel.php中

     new SciForum\\JournalsReview\\SciForumJournalsReviewBundle(), 

And when trying to do 而当尝试做

sudo php composer.phar install

I am getting 我正进入(状态

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.

Any idea? 任何想法? Thank you. 谢谢。

我没有使用定制供应商,而是在主项目中将此定制捆绑包作为辅助捆绑包包含在内,并且一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM