Skip to content

Commit 8708c9d

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Switch to VS18 for the master branch (#22094)
2 parents 6e90c02 + f3938c3 commit 8708c9d

6 files changed

Lines changed: 20 additions & 14 deletions

File tree

.github/actions/setup-windows/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ runs:
1616
- name: Setup PostgreSQL
1717
shell: pwsh
1818
run: |
19-
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
19+
$postgresService = if ($env:PHP_BUILD_CRT -eq "vs18") { "postgresql-x64-17" } else { "postgresql-x64-14" }
20+
Set-Service -Name $postgresService -StartupType manual -Status Running
2021
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" }

.github/matrix.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
153153
}
154154
}
155155
$jobs['WINDOWS']['matrix'] = ['include' => $matrix];
156-
$jobs['WINDOWS']['config'] = version_compare($php_version, '8.4', '>=')
157-
? ['vs_crt_version' => 'vs17']
158-
: ['vs_crt_version' => 'vs16'];
156+
$jobs['WINDOWS']['config'] = match (true) {
157+
version_compare($php_version, '8.6', '>=') => ['vs_crt_version' => 'vs18', 'runs_on' => 'windows-2025-vs2026'],
158+
version_compare($php_version, '8.4', '>=') => ['vs_crt_version' => 'vs17', 'runs_on' => 'windows-2022'],
159+
default => ['vs_crt_version' => 'vs16', 'runs_on' => 'windows-2022'],
160+
};
159161
}
160162
if ($all_jobs || !$no_jobs || $test_freebsd) {
161163
$jobs['FREEBSD']['matrix'] = $all_variations && version_compare($php_version, '8.3', '>=')

.github/scripts/windows/find-vs-toolset.bat

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
setlocal enabledelayedexpansion
44

55
if "%~1"=="" (
6-
echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17]
6+
echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17^|vs18]
77
exit /b 1
88
)
99

1010
set "toolsets_vc14=14.0"
1111
set "toolsets_vc15="
1212
set "toolsets_vs16="
1313
set "toolsets_vs17="
14+
set "toolsets_vs18="
1415

1516

1617
for /f "usebackq tokens=*" %%I in (`vswhere.exe -latest -find "VC\Tools\MSVC"`) do set "MSVCDIR=%%I"
@@ -30,8 +31,10 @@ for /f "delims=" %%D in ('dir /b /ad "%MSVCDIR%"') do (
3031
set "toolsets_vc15=%%D"
3132
) else if !min! LEQ 29 (
3233
set "toolsets_vs16=%%D"
33-
) else (
34+
) else if !min! LEQ 49 (
3435
set "toolsets_vs17=%%D"
36+
) else (
37+
set "toolsets_vs18=%%D"
3538
)
3639
)
3740
)

.github/workflows/test-suite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,12 +941,12 @@ jobs:
941941
fail-fast: false
942942
matrix: ${{ fromJson(inputs.branch).jobs.WINDOWS.matrix }}
943943
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
944-
runs-on: windows-2022
944+
runs-on: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.runs_on }}
945945
env:
946946
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
947947
PHP_BUILD_OBJ_DIR: C:\obj
948948
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
949-
PHP_BUILD_SDK_BRANCH: php-sdk-2.5.0
949+
PHP_BUILD_SDK_BRANCH: php-sdk-2.7.1
950950
PHP_BUILD_CRT: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.vs_crt_version }}
951951
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
952952
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"

ext/com_dotnet/tests/variants.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ foreach ($values as $t => $val) {
4343

4444
echo "OK!";
4545
?>
46-
--EXPECT--
46+
--EXPECTF--
4747
--
4848
add: 84
4949
cat: 4242
@@ -142,8 +142,8 @@ mul: 0
142142
and: 0
143143
div:
144144
variant_div(42, )
145-
exception Division by zero
146-
code 80020012
145+
exception %s
146+
code 800200%x
147147

148148
eqv: -43
149149
idiv:
@@ -258,8 +258,8 @@ mul: 0
258258
and: 0
259259
div:
260260
variant_div(3.5, )
261-
exception Division by zero
262-
code 80020012
261+
exception %s
262+
code 800200%x
263263

264264
eqv: -5
265265
idiv:

win32/build/confutils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3107,7 +3107,7 @@ function toolset_get_compiler_name(short)
31073107
version = probe_binary(PHP_CL).substr(0, 5).replace('.', '');
31083108

31093109
if (version >= 1950) {
3110-
// skip
3110+
name = short ? "VS18" : "Visual C++ 2026";
31113111
} else if (version >= 1930) {
31123112
name = short ? "VS17" : "Visual C++ 2022";
31133113
} else if (version >= 1920) {

0 commit comments

Comments
 (0)