PHP increase breaks existing composer installs
Closed this issue · 4 comments
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Version | Specific version or SHA of a commit |
Actual Behavior
What is the actual behavior?
Downstream requirement of package breaks suddenly, as PHP version change was not announced previously, and there isn't a jump in version number.
Expected Behavior
What is the behavior you expect?
Version number increment to prevent packages requiring this library from breaking.
Steps to Reproduce
What are the steps to reproduce this bug? Please add code examples,
screenshots or links to GitHub repositories that reproduce the problem.
Many packages, for example SparkPost/php-sparkpost have a reliance on this package.
Recently, without warning the PHP requirements for this package were arbitrarily raised without increasing the version number for the package correspondingly. This lead to unexpected issues with composer unable to work out of the blue on PHP versions 5.5, 5.6 and 7.0 branches.
While I don't personally agree with the idea of raising PHP version requirements just for the sake of doing so (as there doesn't appear to be any sort of code requirement for this), what's harmful here is a package that wasn't updated in over a year suddenly updated, and particularly without increasing their version number), so that new installs of the same version number suddenly start failing.
Possible Solutions
This commit should be reverted, and then a new minor release tagged, so that there is a final version with PHP 5.5 - 7.0 compat. Then if desired it could be re-added with a corresponding tag of a new major release, so that people running composer update don't find things suddenly broken.
Can you please describe how you use this package in your project (eg. how you use it in your composer.json)?
Ideally you shouldn't just use the master version, theoretically it is allowed to contain breaking changes. I really have no idea how else composer would break, since if you use the recommended ^1.0
version constraint, composer can find versions installable on both PHP 5.x and 7.x
1.2 is not released, so you are living "on the edge" if you require the development stability version.
looking at what changed since 1.1.1 there seem to be no new features at all: v1.1.1...master . so using 1.1.1 should be fine.
looking at https://github.com/SparkPost/php-sparkpost/blob/db88ca0549bae0684fbd7f1394a72b272300a3af/composer.json#L24 the requirement is formulated correctly and sparkpost should continue to build on php 5.6.
@chriscct7 looks like the issue is on sparkpost side then. Is it resolved now?
Closing as invalid and author didn't respond.