Skip to content

Commit c2b1182

Browse files
committed
Fix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSION
We must not redefine the version "constants" for phpize builds, because these have already generated in phpize.js, from where we pass these variables forward to configure.js. We also add `PHP_EXTRA_VERSION` and `PHP_VERSION_STRING` to the files for completeness. Closes GH-6419.
1 parent 99a8ec6 commit c2b1182

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ PHP NEWS
55
- Core:
66
. Fixed bug #74558 (Can't rebind closure returned by Closure::fromCallable()).
77
(cmb)
8+
. Fixed bug #80345 (PHPIZE configuration has outdated PHP_RELEASE_VERSION).
9+
(cmb)
810

911
26 Nov 2020, PHP 7.4.13
1012

win32/build/confutils.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ if (typeof(CWD) == "undefined") {
9494
CWD = FSO.GetParentFolderName(FSO.GetParentFolderName(FSO.GetAbsolutePathName("main\\php_version.h")));
9595
}
9696

97-
/* defaults; we pick up the precise versions from configure.ac */
98-
var PHP_VERSION = 7;
99-
var PHP_MINOR_VERSION = 4;
100-
var PHP_RELEASE_VERSION = 0;
101-
var PHP_EXTRA_VERSION = "";
102-
var PHP_VERSION_STRING = "7.4.0";
97+
if (!MODE_PHPIZE) {
98+
/* defaults; we pick up the precise versions from configure.ac */
99+
var PHP_VERSION = 7;
100+
var PHP_MINOR_VERSION = 4;
101+
var PHP_RELEASE_VERSION = 0;
102+
var PHP_EXTRA_VERSION = "";
103+
var PHP_VERSION_STRING = "7.4.0";
104+
}
103105

104106
/* Get version numbers and DEFINE as a string */
105107
function get_version_numbers()
@@ -2340,6 +2342,8 @@ function generate_phpize()
23402342
MF.WriteLine("var PHP_VERSION=" + PHP_VERSION);
23412343
MF.WriteLine("var PHP_MINOR_VERSION=" + PHP_MINOR_VERSION);
23422344
MF.WriteLine("var PHP_RELEASE_VERSION=" + PHP_RELEASE_VERSION);
2345+
MF.WriteLine("var PHP_EXTRA_VERSION=\"" + PHP_EXTRA_VERSION + "\"");
2346+
MF.WriteLine("var PHP_VERSION_STRING=\"" + PHP_VERSION_STRING + "\"");
23432347
MF.WriteBlankLines(1);
23442348
MF.WriteLine("/* Genereted extensions list with mode (static/shared) */");
23452349

win32/build/phpize.js.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ C.WriteLine("var PHP_ANALYZER = 'disabled';");
217217
C.WriteLine("var PHP_PGO = 'no';");
218218
C.WriteLine("var PHP_PGI = 'no';");
219219

220+
C.WriteLine("var PHP_VERSION=" + PHP_VERSION);
221+
C.WriteLine("var PHP_MINOR_VERSION=" + PHP_MINOR_VERSION);
222+
C.WriteLine("var PHP_RELEASE_VERSION=" + PHP_RELEASE_VERSION);
223+
C.WriteLine("var PHP_EXTRA_VERSION=\"" + PHP_EXTRA_VERSION + "\"");
224+
C.WriteLine("var PHP_VERSION_STRING=\"" + PHP_VERSION_STRING + "\"");
225+
220226
C.Write(file_get_contents(PHP_DIR + "//script//ext_deps.js"));
221227
if (FSO.FileExists(PHP_DIR + "/script/ext_pickle.js")) {
222228
C.Write(file_get_contents(PHP_DIR + "//script//ext_pickle.js"));

0 commit comments

Comments
 (0)