更正标记版本中的 PHP 版本要求
Correcting PHP version requirement in tagged release
我正在使用 Composer,最近犯了一个错误,我不知道如何修复。
我的包的 2.1.0 版放弃了对 PHP 5.3 和 PHP 5.4 的支持。但是我忘记更改 composer.json
中的版本要求,它停留在 >=5.3
。这个版本在几周前就被标记了。从那时起,composer.json
中的疏忽已得到修复,因为它现在在 2.2.0 及更高版本中正确声明 >=5.5
。
这里的问题是,拥有 PHP 5.3 或 PHP 5.4 并安装版本 ~2.0
的用户现在将获得 2.1.0
,因为它是最新的(据说)匹配版本,之后他们的安装被破坏。
如何以 SemVer 合规的方式解决这个问题?
the FAQ 的这一部分在这里似乎最相关:
What do I do if I accidentally release a backwards incompatible change as a minor version?
As soon as you realize that you’ve broken the Semantic Versioning spec, fix the problem and release a new minor version that corrects the problem and restores backwards compatibility. Even under this circumstance, it is unacceptable to modify versioned releases. If it’s appropriate, document the offending version and inform your users of the problem so that they are aware of the offending version.
您已经发布了更新版本,这很好。
你绝对应该 不 删除已经发布的版本,而只是尽力宣传版本 2.1.0
和 PHP < 5.5 的不兼容性.
我会从 github 存储库和 packagist 中删除标签。
删除不等于修改。您没有移动标签,这会导致重复能力不一致。
删除标签只会使其对任何 new/future 用户不可用。现在 运行 谁是它,要么安装有问题,要么可以安全地更新到较新的版本。
我正在使用 Composer,最近犯了一个错误,我不知道如何修复。
我的包的 2.1.0 版放弃了对 PHP 5.3 和 PHP 5.4 的支持。但是我忘记更改 composer.json
中的版本要求,它停留在 >=5.3
。这个版本在几周前就被标记了。从那时起,composer.json
中的疏忽已得到修复,因为它现在在 2.2.0 及更高版本中正确声明 >=5.5
。
这里的问题是,拥有 PHP 5.3 或 PHP 5.4 并安装版本 ~2.0
的用户现在将获得 2.1.0
,因为它是最新的(据说)匹配版本,之后他们的安装被破坏。
如何以 SemVer 合规的方式解决这个问题?
the FAQ 的这一部分在这里似乎最相关:
What do I do if I accidentally release a backwards incompatible change as a minor version?
As soon as you realize that you’ve broken the Semantic Versioning spec, fix the problem and release a new minor version that corrects the problem and restores backwards compatibility. Even under this circumstance, it is unacceptable to modify versioned releases. If it’s appropriate, document the offending version and inform your users of the problem so that they are aware of the offending version.
您已经发布了更新版本,这很好。
你绝对应该 不 删除已经发布的版本,而只是尽力宣传版本 2.1.0
和 PHP < 5.5 的不兼容性.
我会从 github 存储库和 packagist 中删除标签。
删除不等于修改。您没有移动标签,这会导致重复能力不一致。
删除标签只会使其对任何 new/future 用户不可用。现在 运行 谁是它,要么安装有问题,要么可以安全地更新到较新的版本。