diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml index e0a3fd4e7d31..a5fa4cdddcb1 100644 --- a/.github/actions/setup-windows/action.yml +++ b/.github/actions/setup-windows/action.yml @@ -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!';" } diff --git a/.github/matrix.php b/.github/matrix.php index eb10492d17f5..111aebfb94d1 100644 --- a/.github/matrix.php +++ b/.github/matrix.php @@ -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', '>=') diff --git a/.github/scripts/windows/find-vs-toolset.bat b/.github/scripts/windows/find-vs-toolset.bat index 2d9e68e73031..ecaca6775b07 100644 --- a/.github/scripts/windows/find-vs-toolset.bat +++ b/.github/scripts/windows/find-vs-toolset.bat @@ -3,7 +3,7 @@ setlocal enabledelayedexpansion if "%~1"=="" ( - echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17] + echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17^|vs18] exit /b 1 ) @@ -11,6 +11,7 @@ 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" @@ -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" ) ) ) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 4905dcb9ccbc..af25523805da 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -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' }}" diff --git a/Zend/Optimizer/zend_optimizer.c b/Zend/Optimizer/zend_optimizer.c index cf907ca40bff..d10b4d83fc3e 100644 --- a/Zend/Optimizer/zend_optimizer.c +++ b/Zend/Optimizer/zend_optimizer.c @@ -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) { diff --git a/ext/com_dotnet/tests/variants.phpt b/ext/com_dotnet/tests/variants.phpt index 8547e65efb33..a145fec87ae2 100644 --- a/ext/com_dotnet/tests/variants.phpt +++ b/ext/com_dotnet/tests/variants.phpt @@ -43,7 +43,7 @@ foreach ($values as $t => $val) { echo "OK!"; ?> ---EXPECT-- +--EXPECTF-- -- add: 84 cat: 4242 @@ -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: @@ -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: diff --git a/ext/curl/config.w32 b/ext/curl/config.w32 index c3a55652b638..c3c314f1009c 100644 --- a/ext/curl/config.w32 +++ b/ext/curl/config.w32 @@ -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"); diff --git a/ext/opcache/tests/gh22071.phpt b/ext/opcache/tests/gh22071.phpt new file mode 100644 index 000000000000..148ca461be21 --- /dev/null +++ b/ext/opcache/tests/gh22071.phpt @@ -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-- + +--EXPECT-- +ok diff --git a/win32/build/confutils.js b/win32/build/confutils.js index e695a00c815c..b7289bbcb27a 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -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) {