Fun fact on PHP versionning #156
fredericgboutin-yapla
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking at packagist and saw that your package supports PHP 7.2, 8.0 and 8.1 "only"
https://github.com/spatie/phpunit-watcher/blob/9cbe85bbdee8e614244cc079b954ca34b24aac15/composer.json#L19C9-L19C37
The problem is that writing
^7.2 | ^8.0 | ^8.1
make it so that 8.2, 8.3 and up are also included.This is a surprisingly recurrent problem with all those composer packages.
So I guess that what you meant was
~7.2.0|~8.0.0|~8.1.0
to exclude support for 8.2, right?In the other hand, if every packages had followed that later notation, then it would mean a new PHP minor version would block a component that could in theory work. And we are back at what "minor version" of PHP means.
In theory a minor version of PHP should always be compatible with the current major... but we know this is NOT the case, for example, with deprecated features.
What I'm trying to say is that, you probably should use only
^7.2 | ^8.0
, no need to add|^8.1
since this is redondant. But I suspect you really meant 7.2.x, 8.0.x and 8.1.x only therefore~7.2.0|~8.0.0|~8.1.0
would be more appropriate.Right?
Beta Was this translation helpful? Give feedback.
All reactions