为什么 Composer 无法 find/install 我的包 Laravel 5.2?

Why isn't Composer able to find/install my package for Laravel 5.2?

我正在使用 Laravel 5.2.23,但无法提取我的新软件包 bsapaka/metattribute。我得到异常:

[InvalidArgumentException]
Could not find package bsapaka/metattribute at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

作曲家好像有:

运行 composer show bsapaka/metattribute returns:

name     : bsapaka/metattribute
descrip. : classes for Laravel attributes
keywords : attribute, attributes, properties, alias, meta attribute
versions : dev-master
type     : library
(more)

所以我想知道我是否在 composer.json:

中遗漏了什么
{
    "name": "bsapaka/metattribute",
    "type": "library",
    "description": "classes for Laravel attributes",
    "keywords": [
        "attribute",
        "attributes",
        "properties",
        "meta attribute",
        "alias"
    ],
    "homepage": "https://github.com/bsapaka/metattribute",
    "license": "MIT",
    "require": {
        "illuminate/support": "~5.1",
        "php" : "~5.5|~7.0"
    },
    "require-dev": {
        "phpspec/phpspec": "~2.2"
    },
    "autoload": {
        "psr-4": {
            "bsapaka\metattribute\": "src/"
        }
    },
    "minimum-stability": "stable"
}

我已经做了很多文档阅读、故障排除、添加 mininum-stability、检查版本控制、与其他包进行比较、验证 JSON、寻找我遗漏的花絮等,以及在这一点上,我真的可以在我可能出错的地方使用一些指导。感谢阅读,感谢您的帮助。

您在 GitHub 上的 master 分支中没有定义任何版本标签。

如果没有版本标签,那么 Composer 不知道哪个版本是稳定的。所以如果你的项目中有 "minimum-stability": "stable" 需要你自己制作的包,它找不到任何稳定的版本。

在 GitHub 上的 master 分支中创建一个新标记(例如 1.0.0)以声明最新提交为稳定,或者在项目中使用 dev-master 版本和 "minimum-stability": "dev"这需要你自制的包。