Skip to content

Commit 49068ac

Browse files
authored
Merge branch 'master' into improve-explode-error-message
2 parents 289c9a1 + 9898293 commit 49068ac

408 files changed

Lines changed: 6495 additions & 1500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
6161
$test_macos = in_array('CI: macOS', $labels, true);
6262
$test_msan = in_array('CI: MSAN', $labels, true);
6363
$test_opcache_variation = in_array('CI: Opcache Variation', $labels, true);
64-
$test_pecl = in_array('CI: PECL', $labels, true);
6564
$test_solaris = in_array('CI: Solaris', $labels, true);
6665
$test_windows = in_array('CI: Windows', $labels, true);
6766

@@ -137,9 +136,6 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
137136
if ($all_jobs || $test_opcache_variation) {
138137
$jobs['OPCACHE_VARIATION'] = true;
139138
}
140-
if (($all_jobs && $ref === 'master') || $test_pecl) {
141-
$jobs['PECL'] = true;
142-
}
143139
if (version_compare($php_version, '8.6', '>=') && ($all_jobs || $test_solaris)) {
144140
$jobs['SOLARIS'] = true;
145141
}
@@ -153,9 +149,11 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
153149
}
154150
}
155151
$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'];
152+
$jobs['WINDOWS']['config'] = match (true) {
153+
version_compare($php_version, '8.6', '>=') => ['vs_crt_version' => 'vs18', 'runs_on' => 'windows-2025-vs2026'],
154+
version_compare($php_version, '8.4', '>=') => ['vs_crt_version' => 'vs17', 'runs_on' => 'windows-2022'],
155+
default => ['vs_crt_version' => 'vs16', 'runs_on' => 'windows-2022'],
156+
};
159157
}
160158
if ($all_jobs || !$no_jobs || $test_freebsd) {
161159
$jobs['FREEBSD']['matrix'] = $all_variations && version_compare($php_version, '8.3', '>=')

.github/scripts/download-bundled/uriparser.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cd "$(dirname "$0")/../../.."
55
tmp_dir=/tmp/php-src-download-bundled/uriparser
66
rm -rf "$tmp_dir"
77

8-
revision=refs/tags/uriparser-1.0.1
8+
revision=refs/tags/uriparser-1.0.2
99

1010
git clone --depth 1 --revision="$revision" https://github.com/uriparser/uriparser.git "$tmp_dir"
1111

.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 & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -827,126 +827,18 @@ jobs:
827827
uses: ./.github/actions/test-libmysqlclient
828828
- name: Verify generated files are up to date
829829
uses: ./.github/actions/verify-generated-files
830-
PECL:
831-
if: ${{ fromJson(inputs.branch).jobs.PECL }}
832-
runs-on: ubuntu-24.04
833-
steps:
834-
- name: git checkout PHP
835-
uses: actions/checkout@v6
836-
with:
837-
path: php
838-
ref: ${{ fromJson(inputs.branch).ref }}
839-
# Used for ccache action
840-
- name: Move .github
841-
run: mv php/.github .
842-
- name: git checkout apcu
843-
uses: actions/checkout@v6
844-
with:
845-
repository: krakjoe/apcu
846-
path: apcu
847-
- name: git checkout imagick
848-
uses: actions/checkout@v6
849-
with:
850-
repository: Imagick/imagick
851-
path: imagick
852-
- name: git checkout memcached
853-
uses: actions/checkout@v6
854-
with:
855-
repository: php-memcached-dev/php-memcached
856-
path: memcached
857-
- name: git checkout redis
858-
if: ${{ false }}
859-
uses: actions/checkout@v6
860-
with:
861-
repository: phpredis/phpredis
862-
path: redis
863-
- name: git checkout xdebug
864-
uses: actions/checkout@v6
865-
with:
866-
repository: xdebug/xdebug
867-
path: xdebug
868-
- name: git checkout yaml
869-
uses: actions/checkout@v6
870-
with:
871-
repository: php/pecl-file_formats-yaml
872-
path: yaml
873-
- name: apt
874-
run: |
875-
sudo apt-get update
876-
sudo apt-get install -y --no-install-recommends \
877-
ccache \
878-
libmemcached-dev \
879-
imagemagick \
880-
libmagickwand-dev \
881-
bison \
882-
re2c
883-
- name: ccache
884-
uses: ./.github/actions/ccache
885-
with:
886-
name: "${{ github.job }}"
887-
php_directory: php
888-
- name: build PHP
889-
run: |
890-
cd php
891-
./buildconf --force
892-
./configure \
893-
--enable-option-checking=fatal \
894-
--prefix=/opt/php \
895-
--enable-cli \
896-
--disable-all \
897-
--enable-session \
898-
--enable-werror
899-
make -j$(/usr/bin/nproc)
900-
sudo make install
901-
- name: build apcu
902-
run: |
903-
cd apcu
904-
/opt/php/bin/phpize
905-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
906-
make -j$(/usr/bin/nproc)
907-
- name: build imagick
908-
run: |
909-
cd imagick
910-
/opt/php/bin/phpize
911-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
912-
make -j$(/usr/bin/nproc)
913-
- name: build memcached
914-
run: |
915-
cd memcached
916-
/opt/php/bin/phpize
917-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
918-
make -j$(/usr/bin/nproc)
919-
- name: build redis
920-
if: ${{ false }}
921-
run: |
922-
cd redis
923-
/opt/php/bin/phpize
924-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
925-
make -j$(/usr/bin/nproc)
926-
- name: build xdebug
927-
run: |
928-
cd xdebug
929-
/opt/php/bin/phpize
930-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
931-
make -j$(/usr/bin/nproc)
932-
- name: build yaml
933-
run: |
934-
cd yaml
935-
/opt/php/bin/phpize
936-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
937-
make -j$(/usr/bin/nproc)
938830
WINDOWS:
939831
if: ${{ fromJson(inputs.branch).jobs.WINDOWS }}
940832
strategy:
941833
fail-fast: false
942834
matrix: ${{ fromJson(inputs.branch).jobs.WINDOWS.matrix }}
943835
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
944-
runs-on: windows-2022
836+
runs-on: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.runs_on }}
945837
env:
946838
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
947839
PHP_BUILD_OBJ_DIR: C:\obj
948840
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
949-
PHP_BUILD_SDK_BRANCH: php-sdk-2.5.0
841+
PHP_BUILD_SDK_BRANCH: php-sdk-2.7.1
950842
PHP_BUILD_CRT: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.vs_crt_version }}
951843
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
952844
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ repository. Mailing list subscription is explained on the
9191
[mailing lists page](https://www.php.net/mailing-lists.php).
9292

9393
You may also want to read
94-
[The Mysterious PHP RFC Process](https://blogs.oracle.com/opal/post/the-mysterious-php-rfc-process-and-how-you-can-change-the-web)
94+
[The Mysterious PHP RFC Process](https://web.archive.org/web/20210621140006/https://blogs.oracle.com/opal/the-mysterious-php-rfc-process-and-how-you-can-change-the-web)
9595
for additional notes on the best way to approach submitting an RFC.
9696

9797
## Technical resources

NEWS

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ PHP NEWS
1818
initialization). (Arnaud)
1919
. Enabled the TAILCALL VM on Windows when compiling with Clang >= 19 x86_64.
2020
(henderkes)
21+
. Deprecate specifying a nullable return type for __debugInfo(). (timwolla)
22+
. Fixed bug GH-22142 (Assertion failure in zendi_try_get_long() on IS_UNDEF).
23+
(David Carlier)
2124

2225
- BCMath:
2326
. Added NUL-byte validation to BCMath functions. (jorgsowa)
@@ -51,6 +54,8 @@ PHP NEWS
5154
. gmp_fact() reject values larger than unsigned long. (David Carlier)
5255
. gmp_pow/binomial/root/rootrem and shift/pow operators reject values
5356
larger than unsigned long. (David Carlier)
57+
. GMP exponentiation and shift operators now emit a deprecation warning
58+
when converting a float right operand to int loses precision. (Weilin Du)
5459

5560
- Hash:
5661
. Upgrade xxHash to 0.8.2. (timwolla)
@@ -62,6 +67,12 @@ PHP NEWS
6267
. Fixed bug GH-20426 (Spoofchecker::setRestrictionLevel() error message
6368
suggests missing constants). (DanielEScherzer)
6469
. Added grapheme_strrev (Yuya Hamada)
70+
. Passing a non-stringable object as a time zone to Intl time zone
71+
argument handling now raises TypeError instead of Error. (Weilin Du)
72+
. IntlBreakIterator::getLocale() now raises ValueError for invalid locale
73+
types. (Weilin Du)
74+
. Fixed MessageFormatter::parse() and parseMessage() returning PHP_INT_MIN
75+
as float rather than int on 64-bit platforms. (Weilin Du)
6576

6677
- JSON:
6778
. Enriched JSON last error / exception message with error location.
@@ -98,6 +109,8 @@ PHP NEWS
98109
openssl_x509_parse() output). (StephenWall)
99110
. Added TLS session resumption support for streams with new context options
100111
and Openssl\Session class. (Jakub Zelenka)
112+
. Added TLS external PSK support for streams with new context options and
113+
Openssl\Psk class. (Jakub Zelenka)
101114

102115
- PCNTL:
103116
. pcntl_exec() now throws a ValueError if the $args array is not a list
@@ -122,6 +135,10 @@ PHP NEWS
122135
. Support reference values in Phar::mungServer(). (ndossche)
123136
. Invalid values now throw in Phar::mungServer() instead of being silently
124137
ignored. (ndossche)
138+
. Fixed a bypass of the magic ".phar" directory protection in
139+
Phar::addEmptyDir() for paths starting with "/.phar". (Weilin Du)
140+
. Phar::addEmptyDir() now allows non-magic directory names that merely
141+
share the ".phar" prefix. (Weilin Du)
125142
. Support overridden methods in SplFileInfo for getMTime() and getPathname()
126143
when building a phar. (ndossche)
127144
. Mark Phar::buildFromIterator() base directory argument as a path.
@@ -143,6 +160,16 @@ PHP NEWS
143160
- Session:
144161
. Fixed bug 71162 (updateTimestamp never called when session data is empty).
145162
(Girgias)
163+
. Null bytes in session.cookie_path, session.cookie_domain, and
164+
session.cache_limiter are now rejected with a warning. (jorgsowa)
165+
. session.cookie_samesite now rejects invalid values with a warning; only
166+
"Strict", "Lax", "None", or "" are accepted. (jorgsowa)
167+
. session.cookie_lifetime now rejects non-integer and out-of-range values
168+
with a warning. (jorgsowa)
169+
. Session file GC now recursively cleans nested subdirectories when
170+
session.save_path uses the dirdepth prefix. (jorgsowa)
171+
. Changed defaults of session.use_strict_mode (now 1), session.cookie_httponly
172+
(now 1) and session.cookie_samesite (now "Lax"). (jorgsowa)
146173

147174
- Soap:
148175
. Soap::__setCookie() when cookie name is a digit is now not stored and
@@ -168,6 +195,8 @@ PHP NEWS
168195
with re-entrant getHash()). (Pratik Bhujel)
169196
. Fix bugs GH-8561, GH-8562, GH-8563, and GH-8564 (Fixing various
170197
SplFileObject iterator desync bugs). (iliaal)
198+
. Fix bug GH-22062 (SplDoublyLinkedList iterator UAF
199+
via destructor releasing next node). (David Carlier)
171200

172201
- Sqlite3:
173202
. Fix NUL byte truncation in sqlite3 TEXT column handling. (ndossche)
@@ -201,6 +230,8 @@ PHP NEWS
201230
null bytes. (Weilin Du)
202231
. proc_open() now raises a ValueError when the $cwd argument contains
203232
null bytes. (Weilin Du)
233+
. ini_get_all() now includes the built-in default value in the details.
234+
(sebastian)
204235

205236
- Streams:
206237
. Added so_keepalive, tcp_keepidle, tcp_keepintvl and tcp_keepcnt stream
@@ -216,6 +247,12 @@ PHP NEWS
216247
. Fixed bug #49874 (ftell() and fseek() inconsistency when using stream
217248
filters). (Jakub Zelenka)
218249

250+
- URI:
251+
. Added Uri\Rfc3986\Uri:getUriType() and Uri\WhatWg\Url:isSpecialScheme().
252+
(kocsismate)
253+
. Added Uri\Rfc3986\Uri:getHostType() and Uri\WhatWg\Url:getHostType().
254+
(kocsismate)
255+
219256
- Zip:
220257
. Fixed ZipArchive callback being called after executor has shut down.
221258
(ilutov)

SECURITY.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@ Vulnerability reports remain private until published. When published, you will
1111
be credited as a contributor, and your contribution will reflect the MITRE
1212
Credit System.
1313

14+
# Classification
15+
16+
Issues commonly reported that are _not_ considered security issues include (but
17+
are not limited to):
18+
19+
- Invocation of specially crafted, malicious code intended to cause memory
20+
violations. This commonly includes malicious error handlers, destructors or
21+
`__toString()` functions. PHP does not offer sandboxing, and the execution of
22+
untrusted code is always considered unsafe. Such issues are bugs, but not
23+
security issues. They may still be reported, though please avoid reporting
24+
the known issues.
25+
26+
- Passing malicious arguments to functions clearly not intended to receive
27+
unsanitized values, e.g. `mysqli_query()`. `escapeshellarg()` on the other
28+
hand should clearly be hardened against unsafe inputs.
29+
30+
- The use of legacy APIs or settings known to be insecure, particularly those
31+
documented as such, or those with a secure alternative.
32+
33+
- The use of FFI.
34+
35+
- `open_basedir` or `disable_functions` bypasses.
36+
1437
# Vulnerability Policy
1538

1639
Our full policy is described at

0 commit comments

Comments
 (0)