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
2 changes: 1 addition & 1 deletion Zend/Optimizer/zend_optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ zend_function *zend_optimizer_get_called_func(
if (ce) {
zend_string *func_name = Z_STR_P(CRT_CONSTANT(opline->op2) + 1);
zend_function *fbc = zend_hash_find_ptr(&ce->function_table, func_name);
if (fbc) {
if (fbc && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) {
bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0;
bool same_scope = fbc->common.scope == op_array->scope;
if (is_public || same_scope) {
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
15 changes: 11 additions & 4 deletions ext/curl/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ if (PHP_CURL != "no") {
SETUP_ZLIB_LIB("curl", PHP_CURL) &&
(CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL) &&
CHECK_LIB("brotlidec.lib", "curl", PHP_CURL) &&
CHECK_LIB("brotlicommon.lib", "curl", PHP_CURL) &&
CHECK_LIB("libzstd.lib", "curl", PHP_CURL))
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
) {
if (!(CHECK_HEADER_ADD_INCLUDE("brotli/decode.h", "CFLAGS_CURL") &&
CHECK_LIB("brotlidec.lib;brotlidec-static.lib", "curl", PHP_CURL) &&
CHECK_LIB("brotlicommon.lib;brotlicommon-static.lib", "curl", PHP_CURL)
)) {
WARNING("brotli in curl not enabled; libraries or headers not found");
}
if (!(CHECK_LIB("libzstd.lib;libzstd_a.lib", "curl", PHP_CURL)
)) {
WARNING("zstd in curl not enabled; library not found");
}
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
AC_DEFINE('HAVE_CURL', 1, "Define to 1 if the PHP extension 'curl' is available.");
ADD_FLAG("CFLAGS_CURL", "/D PHP_CURL_EXPORTS=1");
Expand Down
20 changes: 20 additions & 0 deletions ext/opcache/tests/gh22071.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--TEST--
GH-22071: Assertion failure jit_CONST_FUNC_PROTO on abstract static method call
--CREDITS--
YuanchengJiang
--EXTENSIONS--
opcache
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit=1205
opcache.jit_buffer_size=16M
--FILE--
<?php
try {
$e = enum_exists('UnitEnum') ? UnitEnum::cases() : [];
} catch (\Throwable $_e) {}
echo "ok\n";
?>
--EXPECT--
ok
2 changes: 1 addition & 1 deletion win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3175,7 +3175,7 @@ function toolset_get_compiler_name(short)
version = probe_binary(PHP_CL).substr(0, 5).replace('.', '');

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