[php-src] master: Merge branch 'PHP-8.4'

From: Date: Tue, 24 Jun 2025 20:47:49 +0000
Subject: [php-src] master: Merge branch 'PHP-8.4'
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
Author: Shivam Mathur (shivammathur)
Date: 2025-06-25T02:03:18+05:30

Commit: https://github.com/php/php-src/commit/720917f39a3404d48f80d702bbadf20cf792f2ec
Raw diff: https://github.com/php/php-src/commit/720917f39a3404d48f80d702bbadf20cf792f2ec.diff

Merge branch 'PHP-8.4'

Changed paths:
  A  .github/scripts/windows/find-vs-toolset.bat
  M  .github/scripts/windows/build.bat
  M  .github/scripts/windows/test.bat
  M  .github/workflows/root.yml
  M  Zend/tests/bug70258.phpt
  M  Zend/tests/gh11189.phpt
  M  Zend/tests/gh11189_1.phpt


Diff:

diff --git a/.github/scripts/windows/build.bat b/.github/scripts/windows/build.bat
index 65f40fb9462a7..b7beb3a7ef4ba 100644
--- a/.github/scripts/windows/build.bat
+++ b/.github/scripts/windows/build.bat
@@ -41,7 +41,9 @@ if not exist "%SDK_RUNNER%" (
 	exit /b 3
 )
 
-cmd /c %SDK_RUNNER% -t .github\scripts\windows\build_task.bat
+for /f "delims=" %%T in ('call .github\scripts\windows\find-vs-toolset.bat
%PHP_BUILD_CRT%') do set "VS_TOOLSET=%%T"
+echo Got VS Toolset %VS_TOOLSET%
+cmd /c %SDK_RUNNER% -s %VS_TOOLSET% -t .github\scripts\windows\build_task.bat
 if %errorlevel% neq 0 exit /b 3
 
 exit /b 0
diff --git a/.github/scripts/windows/find-vs-toolset.bat
b/.github/scripts/windows/find-vs-toolset.bat
new file mode 100644
index 0000000000000..2d9e68e730318
--- /dev/null
+++ b/.github/scripts/windows/find-vs-toolset.bat
@@ -0,0 +1,49 @@
+@echo off
+
+setlocal enabledelayedexpansion
+
+if "%~1"=="" (
+  echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17]
+  exit /b 1
+)
+
+set "toolsets_vc14=14.0"
+set "toolsets_vc15="
+set "toolsets_vs16="
+set "toolsets_vs17="
+
+
+for /f "usebackq tokens=*" %%I in (vswhere.exe -latest -find
"VC\Tools\MSVC") do set "MSVCDIR=%%I"
+
+if not defined MSVCDIR (
+  echo ERROR: could not locate VC\Tools\MSVC
+  exit /b 1
+)
+
+for /f "delims=" %%D in ('dir /b /ad "%MSVCDIR%"') do (
+  for /f "tokens=1,2 delims=." %%A in ("%%D") do (
+    set "maj=%%A" & set "min=%%B"
+    if "!maj!"=="14" (
+      if !min! LEQ 9 (
+        set "toolsets_vc14=%%D"
+      ) else if !min! LEQ 19 (
+        set "toolsets_vc15=%%D"
+      ) else if !min! LEQ 29 (
+        set "toolsets_vs16=%%D"
+      ) else (
+        set "toolsets_vs17=%%D"
+      )
+    )
+  )
+)
+
+set "KEY=%~1"
+set "VAR=toolsets_%KEY%"
+call set "RESULT=%%%VAR%%%"
+if defined RESULT (
+  echo %RESULT%
+  exit /b 0
+) else (
+  echo ERROR: no toolset found for %KEY%
+  exit /b 1
+)
diff --git a/.github/scripts/windows/test.bat b/.github/scripts/windows/test.bat
index 1a24564697219..b8cc501e0cf3f 100644
--- a/.github/scripts/windows/test.bat
+++ b/.github/scripts/windows/test.bat
@@ -9,7 +9,8 @@ if not exist "%SDK_RUNNER%" (
 	exit /b 3
 )
 
-cmd /c %SDK_RUNNER% -t .github\scripts\windows\test_task.bat
+for /f "delims=" %%T in ('call .github\scripts\windows\find-vs-toolset.bat
%PHP_BUILD_CRT%') do set "VS_TOOLSET=%%T"
+cmd /c %SDK_RUNNER% -s %VS_TOOLSET% -t .github\scripts\windows\test_task.bat
 if %errorlevel% neq 0 exit /b 3
 
 exit /b 0
diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml
index a98bb39ba0d92..78e0d47aa1d15 100644
--- a/.github/workflows/root.yml
+++ b/.github/workflows/root.yml
@@ -58,7 +58,7 @@ jobs:
       ubuntu_version: ${{
         (((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) ||
matrix.branch.version[0] >= 9) && '24.04')
         || '22.04' }}
-      windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1]
>= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
+      windows_version: '2022'
       skip_laravel: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
       skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
       skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
diff --git a/Zend/tests/bug70258.phpt b/Zend/tests/bug70258.phpt
index 40915a286ef9e..d346dbdf3a35b 100644
--- a/Zend/tests/bug70258.phpt
+++ b/Zend/tests/bug70258.phpt
@@ -4,6 +4,9 @@ Bug #70258 (Segfault if do_resize fails to allocated memory)
 memory_limit=2M
 --SKIPIF--
 <?php
+if (PHP_OS_FAMILY === 'Windows') {
+    die("xfail fails on Windows Server 2022 and newer.");
+}
 $zend_mm_enabled = getenv("USE_ZEND_ALLOC");
 if ($zend_mm_enabled === "0") {
     die("skip Zend MM disabled");
diff --git a/Zend/tests/gh11189.phpt b/Zend/tests/gh11189.phpt
index f1c877f20ee47..adbc3ce487c95 100644
--- a/Zend/tests/gh11189.phpt
+++ b/Zend/tests/gh11189.phpt
@@ -2,6 +2,9 @@
 GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state
(packed array)
 --SKIPIF--
 <?php
+if (PHP_OS_FAMILY === 'Windows') {
+    die("xfail fails on Windows Server 2022 and newer.");
+}
 if (getenv("USE_ZEND_ALLOC") === "0") die("skip ZMM is disabled");
 ?>
 --INI--
diff --git a/Zend/tests/gh11189_1.phpt b/Zend/tests/gh11189_1.phpt
index 53727908e5e2a..17b9967bc3182 100644
--- a/Zend/tests/gh11189_1.phpt
+++ b/Zend/tests/gh11189_1.phpt
@@ -2,6 +2,9 @@
 GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state (not
packed array)
 --SKIPIF--
 <?php
+if (PHP_OS_FAMILY === 'Windows') {
+    die("xfail fails on Windows Server 2022 and newer.");
+}
 if (getenv("USE_ZEND_ALLOC") === "0") die("skip ZMM is disabled");
 ?>
 --INI--


Thread (1 message)

  • Shivam Mathur
« previous php.cvs (#134570) next »