Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/setup-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ runs:
- name: Setup PostgreSQL
shell: pwsh
run: |
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
$postgresService = if ($env:PHP_BUILD_CRT -eq "vs18") { "postgresql-x64-17" } else { "postgresql-x64-14" }
Set-Service -Name $postgresService -StartupType manual -Status Running
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" }
8 changes: 5 additions & 3 deletions .github/matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,11 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
}
}
$jobs['WINDOWS']['matrix'] = ['include' => $matrix];
$jobs['WINDOWS']['config'] = version_compare($php_version, '8.4', '>=')
? ['vs_crt_version' => 'vs17']
: ['vs_crt_version' => 'vs16'];
$jobs['WINDOWS']['config'] = match (true) {
version_compare($php_version, '8.6', '>=') => ['vs_crt_version' => 'vs18', 'runs_on' => 'windows-2025-vs2026'],
version_compare($php_version, '8.4', '>=') => ['vs_crt_version' => 'vs17', 'runs_on' => 'windows-2022'],
default => ['vs_crt_version' => 'vs16', 'runs_on' => 'windows-2022'],
};
}
if ($all_jobs || !$no_jobs || $test_freebsd) {
$jobs['FREEBSD']['matrix'] = $all_variations && version_compare($php_version, '8.3', '>=')
Expand Down
7 changes: 5 additions & 2 deletions .github/scripts/windows/find-vs-toolset.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
setlocal enabledelayedexpansion

if "%~1"=="" (
echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17]
echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17^|vs18]
exit /b 1
)

set "toolsets_vc14=14.0"
set "toolsets_vc15="
set "toolsets_vs16="
set "toolsets_vs17="
set "toolsets_vs18="


for /f "usebackq tokens=*" %%I in (`vswhere.exe -latest -find "VC\Tools\MSVC"`) do set "MSVCDIR=%%I"
Expand All @@ -30,8 +31,10 @@ for /f "delims=" %%D in ('dir /b /ad "%MSVCDIR%"') do (
set "toolsets_vc15=%%D"
) else if !min! LEQ 29 (
set "toolsets_vs16=%%D"
) else (
) else if !min! LEQ 49 (
set "toolsets_vs17=%%D"
) else (
set "toolsets_vs18=%%D"
)
)
)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -941,12 +941,12 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(inputs.branch).jobs.WINDOWS.matrix }}
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
runs-on: windows-2022
runs-on: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.runs_on }}
env:
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
PHP_BUILD_OBJ_DIR: C:\obj
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.5.0
PHP_BUILD_SDK_BRANCH: php-sdk-2.7.1
PHP_BUILD_CRT: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.vs_crt_version }}
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
Expand Down
10 changes: 5 additions & 5 deletions ext/com_dotnet/tests/variants.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ foreach ($values as $t => $val) {

echo "OK!";
?>
--EXPECT--
--EXPECTF--
--
add: 84
cat: 4242
Expand Down Expand Up @@ -142,8 +142,8 @@ mul: 0
and: 0
div:
variant_div(42, )
exception Division by zero
code 80020012
exception %s
code 800200%x

eqv: -43
idiv:
Expand Down Expand Up @@ -258,8 +258,8 @@ mul: 0
and: 0
div:
variant_div(3.5, )
exception Division by zero
code 80020012
exception %s
code 800200%x

eqv: -5
idiv:
Expand Down
4 changes: 2 additions & 2 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3101,8 +3101,8 @@ function toolset_get_compiler_name(short)

version = probe_binary(PHP_CL).substr(0, 5).replace('.', '');

if (version >= 1940) {
return name;
if (version >= 1950) {
name = short ? "VS18" : "Visual C++ 2026";
} else if (version >= 1930) {
name = short ? "VS17" : "Visual C++ 2022";
} else if (version >= 1920) {
Expand Down
Loading