나는 2 개의 symfony2 프로젝트의 의존성을 관리하기 위해 작곡가를 사용하고 있습니다.작곡가 depency를 커밋 할 수있게 만드는 방법?
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"repositories": [
{
"type": "vcs",
"url": "[email protected]:commonbundle.git"
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.2.*",
"doctrine/orm": ">=2.2,<3.0,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.2.*",
"symfony/monolog-bundle": "2.2.*",
"sensio/distribution-bundle": "2.2.*",
"sensio/framework-extra-bundle": "2.2.*",
"sensio/generator-bundle": "2.2.*",
"jms/security-extra-bundle": "1.4.*",
"jms/di-extra-bundle": "1.3.*",
"kriswallsmith/assetic": "1.1.*@dev",
"doctrine/common": "2.4.*@dev",
"doctrine/data-fixtures": "dev-master",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"gmp/common-bundle" : "dev-master"
},
"scripts": {
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "symlink",
"branch-alias": {
"dev-master": "2.2-dev"
}
}
}
이 잘 작동 :이 두 프로젝트는 몇 가지 일반적인 물건을 , 나는 모두 composer.json
여기 내 composer.json이 요구된다 (개인) 일반 번들을 만들었습니다. 그러나 나는 두 개의 프로젝트에서 공통 번들의 변경 사항을 변경하고 적용 할 수 있기를 원합니다.
요점은 공통 번들이 독립적이지 않으며 독립 실행 형이 아니라는 것입니다. 그것은 내 2 개의 프로젝트 사이에서 클래스를 복제하지 않는 편리한 방법입니다. 공통 번들의 변경은 항상 내 2 개의 프로젝트 중 하나에서 발생합니다. 공통 번들을 내 프로젝트에서 커밋 할 수있게하려면 어떻게해야합니까?
주 프로젝트 중 하나에서 composer install을 실행할 때 --prefer-source를 사용하면 공통 번들의 공급 업체 디렉토리에 CD를 넣고 변경 한 다음 다시 커밋해야합니다. – catchamonkey
@catchamonkey이 주석은 대답이어야합니다. – Hailwood
고마워요. @Hailwood, 네가 맞아. – catchamonkey