我想从公共Github
存储库(fork)修改一个扩展,并通过composer
将其安装到我的Magento2。
此处存储的扩展程序GitHub。真的,我只需要一个sample-external-links
。我多次尝试在我的Magento2根目录中配置composer.json,但它不起作用,我收到错误:
[作曲\下载\ TransportException] 无法下载“https://api.github.com/repos/magento/magento2-samples/sample-external-links”文件(HTTP / 1.1 404 Not Found)
如何将composer配置为仅从某个存储库安装1个软件包?
my composer.json:
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/product-community-edition": "2.1.0",
"composer/composer": "@alpha",
"magento/sample-bundle-all": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "4.1.0",
"squizlabs/php_codesniffer": "1.5.3",
"phpmd/phpmd": "@stable",
"pdepend/pdepend": "2.2.2",
"fabpot/php-cs-fixer": "~1.2",
"lusitanian/oauth": "~0.3 <=0.7.0",
"sebastian/phpcpd": "2.0.0"
},
"config": {
"use-include-path": true
},
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/"
},
"psr-0": {
"": "app/code/"
},
"files": [
"app/etc/NonComposerComponentRegistration.php"
]
},
"autoload-dev": {
"psr-4": {
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
}
},
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": [
{ "type": "vcs",
"url": "https://github.com/magento/magento2-samples/sample-external-links"
}
],
"extra": {
"magento-force": "override"
}
答案 0 :(得分:0)
您可以尝试一下吗?
更改
<ion-view view-title="Search">
<ion-content class="has-header">
<div class="list list-inset">
<label class="item item-input">
<input ng-model="searchForm.name" name="fieldName" type="text" placeholder="Nome" ng-minlength="2" ng-maxlength="70" focus>
</label>
<label class="item item-input">
<input ng-model="searchForm.city" name="fieldEmail" type="email" placeholder="E-mail" ng-maxlength="50" focus>
</label>
</div>
</ion-content>
</ion-view>
到
"repositories": [
{ "type": "vcs",
"url": "https://github.com/magento/magento2-samples/sample-external-links"
}
],
然后根据需要添加模块:
"repositories": [
{
"type": "vcs",
"url": "git@github.com:samples/sample-external-links.git"
}
],