Jeroen De Dauw
Jeroen De Dauw

Reputation: 10918

Correcting PHP version requirement in tagged release

I'm using Composer and have recently made a mistake I do not know how to fix.

Version 2.1.0 of my package dropped support for PHP 5.3 and PHP 5.4. However I forgot to change the version requirement in composer.json, which stayed at >=5.3. This release got tagged a few weeks ago. Since then the oversight in composer.json has been fixed, as it now correctly states >=5.5 in release 2.2.0 and later.

The issue here is that people that have PHP 5.3 or PHP 5.4, and install version ~2.0, will now get 2.1.0, as it's the latest (supposedly) matching release, after which their installation is broken.

How can I address this issue in a SemVer compliant manner?

Upvotes: 3

Views: 80

Answers (2)

scrowler
scrowler

Reputation: 24425

This part of the FAQ (semver.org) seems most relevant here:

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.

You've already released the updated version, which is good.

You should definitely not remove the already released version, but instead just do your best to publicize the incompatibility for version 2.1.0 and PHP < 5.5.

Upvotes: 3

alcohol
alcohol

Reputation: 24156

I would remove the tag from both the github repository and packagist.

Removing does not equal modifying. You're not moving the tag which would result in inconsistent repeat-ability.

Removing the tag simply makes it unavailable for any new/future users. Whoever is running it now, either has a broken install, or can safely update to a newer version.

Upvotes: 1

Related Questions