mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
Unify types of PHP_VERSION and friends on Windows
For `phpize` builds, all three version variables are numbers, but for `buildconf` builds, all are strings. This can yield surprising results when extensions create their `PHP_VERSION_ID` like 10000 * PHP_VERSION + 100 * PHP_MINOR_VERSION + PHP_RELEASE_VERSION Since `phpize` builds are way more common for external extensions nowadays, we change the types for `buildconf` builds. Closes GH-16247.
This commit is contained in:
parent
2f52dbd7b7
commit
a74eb24e69
@ -102,6 +102,10 @@ PHP 8.5 UPGRADE NOTES
|
||||
12. Windows Support
|
||||
========================================
|
||||
|
||||
* The configuration variables PHP_VERSION, PHP_MINOR_VERSION, and
|
||||
PHP_RELEASE_VERSION are now always numbers. Previously, they have been
|
||||
strings for buildconf builds.
|
||||
|
||||
========================================
|
||||
13. Other Changes
|
||||
========================================
|
||||
|
@ -108,9 +108,9 @@ function get_version_numbers()
|
||||
var regex = /AC_INIT.+(\d+)\.(\d+)\.(\d+)([^\,^\]]*).+/g;
|
||||
|
||||
if (cin.match(new RegExp(regex))) {
|
||||
PHP_VERSION = RegExp.$1;
|
||||
PHP_MINOR_VERSION = RegExp.$2;
|
||||
PHP_RELEASE_VERSION = RegExp.$3;
|
||||
PHP_VERSION = +RegExp.$1;
|
||||
PHP_MINOR_VERSION = +RegExp.$2;
|
||||
PHP_RELEASE_VERSION = +RegExp.$3;
|
||||
PHP_EXTRA_VERSION = RegExp.$4;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user