我用laravel打包器在laravel中创建了一个包,我将它推送到我的github帐户并提交给Packagist。当我点击
composer require mortezarajabi/jdate
在根目录中,我得到了
[InvalidArgumentException]
Could not find package mortezarajabi/jdate at any version for your minimum-
stability (stable). Check the package spelling or your minimum-stability
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
这是我的作曲家
{
"name": "mortezrajabi/jdate",
"type": "library",
"description": "Jalali(Falaki) date for laravel",
"keywords": [
"mortezarajabi",
"jdata"
],
"homepage": "https://github.com/mortezarajabi/jdate",
"license": "MIT",
"authors": [
{
"name": "mortezarajabi",
"email": "emortezarajabi@gmail.com",
"homepage": "http://mortezarajabi.com",
"role": "Developer"
}
],
"require": {
"illuminate/support": "~5",
"php" : ">=5.4.0"
},
"autoload": {
"psr-4": {
"rajabi\\jdate\\": "src"
}
}
}
任何建议?
答案 0 :(得分:1)
问题是你在Git中没有包tag
。 Packagist使用标签进行包版本控制。它将使用您的最新代码作为composer require mortezarajabi/jdate
中的默认版本。
因此,如果您只想使用master
分支,则可以在 composer.json 中对其进行操作,如下所示:
"require": { "mortezarajabi/jdate" : "dev-master" }
"minimum-stability": "dev"
然后你可以:
composer update