为什么作曲家无法找到/安装我的 Laravel 5.2 软件包


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

我正在使用Laravel 5.2.23,无法拉入我的新软件包bsapaka/metattribute。我得到例外:

[无效参数异常]
找不到任何版本的软件包 bsapaka/metattribute 为您的最低稳定性(稳定)。检查包装拼写或最低稳定性

作曲家似乎有它:

运行composer show bsapaka/metattribute返回:

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 上的主分支中创建一个新标签(例如 1.0.0),以声明最新的提交为稳定,或者在需要自制包的项目中使用 dev-master 版本和"minimum-stability": "dev"

相关文章: