作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我将 composer 文件中的 PHP 包名称从 "name": "author/author-php"
更改为 "name": "author/author"
然后做了composer install
& composer update
,将我的更改与 master 合并,然后创建一个版本。
但是在 Packagist 上更新库后,新名称不起作用, Composer 无法在 composer require author/author
找到它,我什至无法下载这个新版本。
注意:repo 名称仍然是 author-php
那么这就是 Packagist 没有重命名它的原因吗?
最佳答案
截至目前,您不能更新包名,我相信是出于安全原因(如果允许重命名,有害代码可能会作为旧名称,然后尚未更新其 composer.json 的依赖项目将拉有害代码)。已在 Packagist's Github page 上讨论过,这种操作的流程是这个(从上面的链接复制粘贴):
- Update the name in composer.json on the master branch or whatever the default branch is
- Resubmitting the package to packagist using the new name
- Mark the old package as "Abandoned" on packagist, and use the new name in the form so that people get pointed to it when they install with the old name
- And no you can't keep your download stats
关于php - 如何在 Packagist 中重命名 PHP 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55378780/
我是一名优秀的程序员,十分优秀!