Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing upper constraint for PHP version #141

Closed
mathbr opened this issue Jun 16, 2017 · 6 comments
Closed

Missing upper constraint for PHP version #141

mathbr opened this issue Jun 16, 2017 · 6 comments

Comments

@mathbr
Copy link

mathbr commented Jun 16, 2017

Currently the composer.json contains this:

    "require": {
        "php": ">=7"
    },

This promises that this library is compatible to any future PHP version (e.g. 8, 9, etc.) for all eternity.

Realistically speaking this is impossible thus this should be changed:

    "require": {
        "php": "^7.0"
    },
@kelunik
Copy link
Member

kelunik commented Jun 16, 2017

No, it shouldn't be changed. PHP doesn't follow semver and restricting the runtime upper bound is nonsense.

@kelunik kelunik closed this as completed Jun 16, 2017
@mathbr
Copy link
Author

mathbr commented Jun 16, 2017

Well then, looking forward to using this library with PHP in a few years. ;-)

@bwoebi
Copy link
Member

bwoebi commented Jun 17, 2017

If you restrict this at all, the restriction would need to be >=7.0, <7.3, because PHP has several BC breaks every minor version, which all could cause a break of this library.

Also, one can't just pull a new php version via composer. Composer can always pull an older version of a library dependency though.

It's the responsibility of the run-time to be as forward compatible and as less breaking as possible, between every version.

@mathbr
Copy link
Author

mathbr commented Jun 17, 2017

@bwoebi You are absolutely right, i should have phrased it like that. This way it becomes clear what PHP versions this library has been tested against and is guaranteed to work with.

@kelunik
Copy link
Member

kelunik commented Jun 17, 2017

@mathbr Sorry for being a bit harsh. We would maybe decide differently if PHP was pulled via Composer, but with the current way of working, >=7 is the better choice IMO.

@mathbr
Copy link
Author

mathbr commented Jun 17, 2017

@kelunik No worries, I'm not offended. ;-) You are the maintainer, thus it's your choice.

staabm pushed a commit to staabm/amp that referenced this issue Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants