我必須保留0.18 sylius/sylius如何用我自己的VCS存儲庫覆蓋作曲家中的sylius 0.18?
我已經fork了master並創建了一個新的分支0.18,合併到一些PR中。
現在我想使用這個倉庫,而不是sylius/sylius v0.18標籤
這裏我composer.json
{
"name": "sylius/sylius-standard",
"description": "Starting point for projects powered by Sylius eCommerce.",
"keywords": ["symfony", "symfony2", "sylius", "distribution", "ecommerce", "cart", "shopping"],
"type": "project",
"license": "MIT",
"homepage": "http://sylius.org",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ibasaw/DoctrineBehaviors"
},
{
"type": "vcs",
"url": "https://github.com/ibasaw/sylius"
}
],
"require": {
"php": ">=5.6",
"sylius/sylius": "^[email protected]",
......
},
"require-dev": {
"behat/behat": "^3.0",
"behat/symfony2-extension": "^2.0",
"behat/mink-extension": "^2.0",
"behat/mink-browserkit-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.2",
"behat/mink": "^1.6",
"coduo/php-matcher": "^[email protected]",
"phpspec/phpspec": "^2.4",
"phpunit/phpunit": "^4.1",
"lakion/api-test-case": "^[email protected]"
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"autoload": {
"psr-0": {
"": "src/",
"Context": "features/"
}
},
"config": {
"bin-dir": "bin"
},
"extra": {
"branch-alias": {
"dev-master": "0.18"
},
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
當我做了作曲家更新,在供應商目錄需要sylius/sylius而不是ibasaw/sylius
爲什麼?
如何強制使用我的新分支0.18的VCS?
我用「branch-alias」替換了「branch-alias」:{「dev-master」:「0.18」}:{「dev-master」:「0.18-dev」}它似乎採取了良好的存儲庫。但現在我得到了這個問題:致命的錯誤:類'Sylius \ Bundle \ CoreBundle \ Kernel \ Kernel'找不到在/var/www/sources/xxx/app/AppKernel.php在線9 – ibasaw
大多數情況下,因爲'Sylius \ Bundle \ CoreBundle \ Kernel \ Kernel'在v0.18和v0.19之間被替換爲'Sylius \ Bundle \ CoreBundle \ Application \ Kernel'。你可以檢查它[這裏](https://github.com/Sylius/Sylius/blob/v0.19.0/app/AppKernel.php#L12) – lchrusciel