我创建了一个正在开发的小部件。问题是我跑的时候:
composer require chofoteddy/yii2-bootstrap-wizard "*"
我收到以下消息:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for chofoteddy/yii2-bootstrap-wizard * -> satisfiable by chofoteddy/yii2-bootstrap-wizard[dev-master].
- chofoteddy/yii2-bootstrap-wizard dev-master requires vinceg/twitter-bootstrap-wizard * -> no matching package found.
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.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
我寻求的是添加https://github.com/VinceG/twitter-bootstrap-wizard.git存储库作为我项目的依赖项。 &#34; VinceG / Twitter的自举的向导&#34;未在&#34; Packagist&#34;。
中注册我修改了很多次我的composer.json文件,以便纠正它,但我无法使它工作。
我的文件composer.json:
{
"name": "chofoteddy/yii2-bootstrap-wizard",
"description": "Wizard form based on twitter bootstrap plugin (@VinceG)",
"homepage": "https://github.com/Chofoteddy/yii2-bootstrap-wizard",
"keywords": [
"yii2",
"wizard",
"bootstrap",
"yii2-extension"
],
"type": "yii2-extension",
"version": "0.1",
"license": "MIT",
"authors": [
{
"name": "Christopher",
"email": "chofoteddy88@yahoo.com.mx"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=5.4.0",
"VinceG/twitter-bootstrap-wizard": "*"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/VinceG/twitter-bootstrap-wizard"
}
],
"autoload": {
"psr-4": {
"chofoteddy\\wizard\\": ""
}
}
}
作曲家信息:
sudo composer self-update
You are already using composer version b2173d28fc8b56236eddc8aa10dcda61471633ec.
答案 0 :(得分:1)
由于VinceG/twitter-bootstrap-wizard
不是Composer包(它不包含composer.json
),您必须在composer.json
您的存储库部分应如下所示:
"repositories": [
{
"type": "package",
"package": {
"name": "VinceG/twitter-bootstrap-wizard",
"version": "1.2",
"dist": {
"url": "https://github.com/VinceG/twitter-bootstrap-wizard/archive/1.2.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/VinceG/twitter-bootstrap-wizard.git",
"type": "git",
"reference": "1.2"
}
}
}
],
您可能还需要查看component-installer和composer-asset-plugin来管理编辑器中的组件和bower包。