Skip to content

Commit

Permalink
Fix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSION
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cmb69 committed Nov 19, 2020
1 parent 99a8ec6 commit c2b1182
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PHP NEWS
- Core:
. Fixed bug #74558 (Can't rebind closure returned by Closure::fromCallable()).
(cmb)
. Fixed bug #80345 (PHPIZE configuration has outdated PHP_RELEASE_VERSION).
(cmb)

26 Nov 2020, PHP 7.4.13

Expand Down
16 changes: 10 additions & 6 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ if (typeof(CWD) == "undefined") {
CWD = FSO.GetParentFolderName(FSO.GetParentFolderName(FSO.GetAbsolutePathName("main\\php_version.h")));
}

/* defaults; we pick up the precise versions from configure.ac */
var PHP_VERSION = 7;
var PHP_MINOR_VERSION = 4;
var PHP_RELEASE_VERSION = 0;
var PHP_EXTRA_VERSION = "";
var PHP_VERSION_STRING = "7.4.0";
if (!MODE_PHPIZE) {
/* defaults; we pick up the precise versions from configure.ac */
var PHP_VERSION = 7;
var PHP_MINOR_VERSION = 4;
var PHP_RELEASE_VERSION = 0;
var PHP_EXTRA_VERSION = "";
var PHP_VERSION_STRING = "7.4.0";
}

/* Get version numbers and DEFINE as a string */
function get_version_numbers()
Expand Down Expand Up @@ -2340,6 +2342,8 @@ function generate_phpize()
MF.WriteLine("var PHP_VERSION=" + PHP_VERSION);
MF.WriteLine("var PHP_MINOR_VERSION=" + PHP_MINOR_VERSION);
MF.WriteLine("var PHP_RELEASE_VERSION=" + PHP_RELEASE_VERSION);
MF.WriteLine("var PHP_EXTRA_VERSION=\"" + PHP_EXTRA_VERSION + "\"");
MF.WriteLine("var PHP_VERSION_STRING=\"" + PHP_VERSION_STRING + "\"");
MF.WriteBlankLines(1);
MF.WriteLine("/* Genereted extensions list with mode (static/shared) */");

Expand Down
6 changes: 6 additions & 0 deletions win32/build/phpize.js.in
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ C.WriteLine("var PHP_ANALYZER = 'disabled';");
C.WriteLine("var PHP_PGO = 'no';");
C.WriteLine("var PHP_PGI = 'no';");

C.WriteLine("var PHP_VERSION=" + PHP_VERSION);
C.WriteLine("var PHP_MINOR_VERSION=" + PHP_MINOR_VERSION);
C.WriteLine("var PHP_RELEASE_VERSION=" + PHP_RELEASE_VERSION);
C.WriteLine("var PHP_EXTRA_VERSION=\"" + PHP_EXTRA_VERSION + "\"");
C.WriteLine("var PHP_VERSION_STRING=\"" + PHP_VERSION_STRING + "\"");

C.Write(file_get_contents(PHP_DIR + "//script//ext_deps.js"));
if (FSO.FileExists(PHP_DIR + "/script/ext_pickle.js")) {
C.Write(file_get_contents(PHP_DIR + "//script//ext_pickle.js"));
Expand Down

0 comments on commit c2b1182

Please sign in to comment.