-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
phpversion('frankenphp')
should not have the leading v
#788
Comments
I would think that as long as we're internally consistent with version numbers (whether there is a "v" or not a "v"), it will be fine as it doesn't make sense to compare versions with other packages. I also believe that Frankenphp uses Semver, which php's Can you describe what you're trying to do and why? I think if we understood the use-case and why it is important, it would help a case on changing how things are versioned vs. just suggesting that things be versioned in a certain way. |
The version number as per Semver starts with a digit: https://semver.org/lang/de/#backusnaur-form-grammatik-f%C3%BCr-valide-semver-versionen The
The output of
Note that I am not suggesting to change the versioning. I'm just suggesting to drop the prefix from the programmatic access. As for your question: I don’t have a direct use case (yet), this was a random find and I wanted to raise it before folks stumble upon this when trying to |
TBH, I wasn't even aware that it was possible to use |
It's taken from the Line 419 in 469070c
|
What happened?
Compared to every other extension I checked (except for mysqlnd), FrankenPHP is the only one whose version number has a
v
prefix. This is inconsistent with the greater ecosystem and breaks naiveversion_compare()
checks to verify a specific FrankenPHP version is used (or not used), because thev
as a string orders before all numbers:Here's an example list of extensions with their
phpversion($ext)
output, both bundled extensions as well as extensions from pecl (e.g. Imagick, or Redis):I would recommend dropping the leading
v
forphpversion('frankenphp')
for consistency.Build Type
Docker (Debian Bookworm)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
No response
The text was updated successfully, but these errors were encountered: