Skip to content

Commit cb99afd

Browse files
authored
Merge branch 'master' into feat/zend-class-use-traits
2 parents 57026f7 + 0caebcd commit cb99afd

File tree

256 files changed

+10366
-10519
lines changed

Some content is hidden

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

256 files changed

+10366
-10519
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
arm:
55
resource_class: arm.medium
66
docker:
7-
- image: cimg/base:current-22.04
7+
- image: cimg/base:current-24.04
88
- image: mysql:8.3
99
environment:
1010
MYSQL_ALLOW_EMPTY_PASSWORD: true
@@ -60,7 +60,7 @@ jobs:
6060
libreadline-dev \
6161
libldap2-dev \
6262
libsodium-dev \
63-
libargon2-0-dev \
63+
libargon2-dev \
6464
libmm-dev \
6565
libsnmp-dev \
6666
snmpd \
@@ -78,7 +78,7 @@ jobs:
7878
libqdbm-dev \
7979
libjpeg-dev \
8080
libpng-dev \
81-
libfreetype6-dev
81+
libfreetype-dev
8282
- run:
8383
name: ./configure
8484
command: |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ runs:
1111
-p 1433:1433 \
1212
--name sql1 \
1313
-h sql1 \
14-
-d mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
14+
-d mcr.microsoft.com/mssql/server:2025-latest

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- docs/**
1111
jobs:
1212
pages:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-latest
1414
permissions:
1515
pages: write
1616
id-token: write

.github/workflows/nightly.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ jobs:
429429
FIREBIRD_DATABASE: test.fdb
430430
FIREBIRD_USER: test
431431
FIREBIRD_PASSWORD: test
432-
runs-on: ubuntu-22.04
432+
runs-on: ubuntu-24.04
433433
steps:
434434
- name: git checkout
435435
uses: actions/checkout@v6
@@ -862,7 +862,7 @@ jobs:
862862
uses: ./.github/actions/verify-generated-files
863863
PECL:
864864
if: inputs.branch == 'master'
865-
runs-on: ubuntu-22.04
865+
runs-on: ubuntu-24.04
866866
env:
867867
CC: ccache gcc
868868
CXX: ccache g++
@@ -909,6 +909,8 @@ jobs:
909909
sudo apt-get install -y --no-install-recommends \
910910
ccache \
911911
libmemcached-dev \
912+
imagemagick \
913+
libmagickwand-dev \
912914
bison \
913915
re2c
914916
- name: ccache

.github/workflows/real-time-benchmark.yml

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,6 @@ on:
2424
options:
2525
- "0"
2626
- "1"
27-
opcache:
28-
description: 'Whether opcache is enabled for the benchmarked commit'
29-
required: true
30-
default: "1"
31-
type: choice
32-
options:
33-
- "0"
34-
- "1"
35-
- "2"
36-
baseline_opcache:
37-
description: 'Whether opcache is enabled for the baseline commit'
38-
required: true
39-
default: "1"
40-
type: choice
41-
options:
42-
- "0"
43-
- "1"
44-
- "2"
4527
run_micro_bench:
4628
description: 'Whether to run the micro_bench.php test'
4729
required: true
@@ -60,17 +42,15 @@ jobs:
6042
REAL_TIME_BENCHMARK:
6143
name: REAL_TIME_BENCHMARK
6244
if: github.repository == 'php/php-src' || github.event_name == 'workflow_dispatch'
63-
runs-on: ubuntu-22.04
45+
runs-on: ubuntu-24.04
6446
env:
6547
REPOSITORY: ${{ github.repository }}
6648
BRANCH: "master"
6749
COMMIT: ${{ github.sha }}
6850
BASELINE_COMMIT: "d5f6e56610c729710073350af318c4ea1b292cfe"
6951
ID: "master"
70-
OPCACHE: "1"
71-
BASELINE_OPCACHE: "2"
7252
JIT: "1"
73-
INSTRUCTION_COUNT: "1"
53+
INSTRUCTION_COUNT: "0"
7454
RUN_MICRO_BENCH: "0"
7555
YEAR: ""
7656
steps:
@@ -82,7 +62,7 @@ jobs:
8262
echo "YEAR=$YEAR" >> $GITHUB_ENV
8363
8464
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
85-
PR_INFO=$(gh pr view ${{ inputs.pull_request }} --json headRepositoryOwner,headRepository,headRefName,headRefOid,baseRefOid --repo ${{ github.repository }} | jq -r '.headRepositoryOwner.login, .headRepository.name, .headRefName, .headRefOid, .baseRefOid')
65+
PR_INFO=$(gh pr view ${{ inputs.pull_request }} --json headRepositoryOwner,headRepository,headRefName,headRefOid,baseRefName --repo ${{ github.repository }} | jq -r '.headRepositoryOwner.login, .headRepository.name, .headRefName, .headRefOid, .baseRefName')
8666
8767
REPOSITORY="$(echo "$PR_INFO" | sed -n '1p')/$(echo "$PR_INFO" | sed -n '2p')"
8868
echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV
@@ -93,13 +73,13 @@ jobs:
9373
COMMIT=$(echo "$PR_INFO" | sed -n '4p')
9474
echo "COMMIT=$COMMIT" >> $GITHUB_ENV
9575
96-
BASELINE_COMMIT=$(echo "$PR_INFO" | sed -n '5p')
76+
BASELINE_BRANCH=$(echo "$PR_INFO" | sed -n '5p')
77+
78+
BASELINE_COMMIT=$(gh api /repos/${{ github.repository }}/compare/$BASELINE_BRANCH...$COMMIT --jq '.merge_base_commit.sha')
9779
echo "BASELINE_COMMIT=$BASELINE_COMMIT" >> $GITHUB_ENV
9880
9981
echo "ID=benchmarked" >> $GITHUB_ENV
10082
101-
echo "OPCACHE=${{ inputs.opcache }}" >> $GITHUB_ENV
102-
echo "BASELINE_OPCACHE=${{ inputs.baseline_opcache }}" >> $GITHUB_ENV
10383
echo "JIT=${{ inputs.jit }}" >> $GITHUB_ENV
10484
echo "INSTRUCTION_COUNT=${{ inputs.instruction_count }}" >> $GITHUB_ENV
10585
echo "RUN_MICRO_BENCH=${{ inputs.run_micro_bench }}" >> $GITHUB_ENV
@@ -151,18 +131,6 @@ jobs:
151131
repository: php/real-time-benchmark-data
152132
ssh-key: ${{ secrets.PHP_VERSION_BENCHMARK_RESULTS_DEPLOY_KEY }}
153133
path: 'php-version-benchmarks/docs/results'
154-
- name: Setup infra config
155-
run: |
156-
set -e
157-
158-
cp ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini.dist ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
159-
ESCAPED_DOCKER_REGISTRY=$(printf '%s\n' "${{ secrets.PHP_VERSION_BENCHMARK_DOCKER_REGISTRY }}" | sed -e 's/[\/&]/\\&/g')
160-
sed -i "s/INFRA_DOCKER_REGISTRY=public.ecr.aws\/abcdefgh/INFRA_DOCKER_REGISTRY=$ESCAPED_DOCKER_REGISTRY/g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
161-
sed -i "s/INFRA_MEASURE_INSTRUCTION_COUNT=0/INFRA_MEASURE_INSTRUCTION_COUNT=${{ env.INSTRUCTION_COUNT }}/g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
162-
cp ./php-version-benchmarks/build/infrastructure/config/aws.tfvars.dist ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
163-
sed -i 's/access_key = ""/access_key = "${{ secrets.PHP_VERSION_BENCHMARK_AWS_ACCESS_KEY }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
164-
sed -i 's/secret_key = ""/secret_key = "${{ secrets.PHP_VERSION_BENCHMARK_AWS_SECRET_KEY }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
165-
sed -i 's/github_token = ""/github_token = "${{ secrets.GITHUB_TOKEN }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
166134
- name: Setup PHP config - baseline PHP version
167135
run: |
168136
set -e
@@ -173,11 +141,10 @@ jobs:
173141
PHP_NAME="PHP - baseline@$BASELINE_SHORT_SHA"
174142
PHP_ID=php_baseline
175143
176-
PHP_REPO=https://github.com/${{ env.REPOSITORY }}.git
144+
PHP_REPO=${{ github.server_url }}/${{ env.REPOSITORY }}.git
177145
PHP_BRANCH=${{ env.BRANCH }}
178146
PHP_COMMIT=${{ env.BASELINE_COMMIT }}
179147
180-
PHP_OPCACHE=${{ env.BASELINE_OPCACHE }}
181148
PHP_JIT=0
182149
EOF
183150
- name: Setup PHP config - baseline PHP version with JIT
@@ -191,11 +158,10 @@ jobs:
191158
PHP_NAME="PHP - baseline@$BASELINE_SHORT_SHA (JIT)"
192159
PHP_ID=php_baseline_jit
193160
194-
PHP_REPO=https://github.com/${{ env.REPOSITORY }}.git
161+
PHP_REPO=${{ github.server_url }}/${{ env.REPOSITORY }}.git
195162
PHP_BRANCH=${{ env.BRANCH }}
196163
PHP_COMMIT=${{ env.BASELINE_COMMIT }}
197164
198-
PHP_OPCACHE=${{ env.BASELINE_OPCACHE }}
199165
PHP_JIT=${{ env.JIT }}
200166
EOF
201167
@@ -213,15 +179,16 @@ jobs:
213179
LAST_RESULT_SHA="$(cd ./php-version-benchmarks/tmp/php_${{ env.ID }}/ && git --no-pager log --until="$YESTERDAY" -n 1 --pretty='%H')"
214180
fi
215181
182+
echo "LAST_RESULT_SHA=$LAST_RESULT_SHA" >> $GITHUB_ENV
183+
216184
cat << EOF > ./php-version-benchmarks/config/php/previous.ini
217185
PHP_NAME="PHP - previous ${{ env.BRANCH }}"
218186
PHP_ID=php_previous
219187
220-
PHP_REPO=https://github.com/${{ env.REPOSITORY }}.git
188+
PHP_REPO=${{ github.server_url }}/${{ env.REPOSITORY }}.git
221189
PHP_BRANCH=${{ env.BRANCH }}
222190
PHP_COMMIT=$LAST_RESULT_SHA
223191
224-
PHP_OPCACHE=1
225192
PHP_JIT=0
226193
EOF
227194
- name: Setup PHP config - benchmarked PHP version
@@ -232,11 +199,10 @@ jobs:
232199
PHP_NAME="PHP - ${{ env.BRANCH }}"
233200
PHP_ID=php_${{ env.ID }}
234201
235-
PHP_REPO=https://github.com/${{ env.REPOSITORY }}.git
202+
PHP_REPO=${{ github.server_url }}/${{ env.REPOSITORY }}.git
236203
PHP_BRANCH=${{ env.BRANCH }}
237204
PHP_COMMIT=${{ env.COMMIT }}
238205
239-
PHP_OPCACHE=${{ env.OPCACHE }}
240206
PHP_JIT=0
241207
EOF
242208
- name: Setup PHP config - benchmarked PHP version with JIT
@@ -248,11 +214,10 @@ jobs:
248214
PHP_NAME="PHP - ${{ env.BRANCH }} (JIT)"
249215
PHP_ID=php_${{ env.ID }}_jit
250216
251-
PHP_REPO=https://github.com/${{ env.REPOSITORY }}.git
217+
PHP_REPO=${{ github.server_url }}/${{ env.REPOSITORY }}.git
252218
PHP_BRANCH=${{ env.BRANCH }}
253219
PHP_COMMIT=${{ env.COMMIT }}
254220
255-
PHP_OPCACHE=${{ env.OPCACHE }}
256221
PHP_JIT=${{ env.JIT }}
257222
EOF
258223
@@ -269,6 +234,37 @@ jobs:
269234
if [ "${{ env.RUN_MICRO_BENCH }}" -eq "1" ]; then
270235
cp ./php-version-benchmarks/config/test/6_micro_bench.php.ini.dist ./php-version-benchmarks/config/test/6_micro_bench.php.ini
271236
fi
237+
- name: Setup infra config
238+
run: |
239+
set -e
240+
241+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
242+
WORKSPACE="manual"
243+
BASE_COMMIT="$(echo "${{ env.BASELINE_COMMIT }}" | cut -c 1-6)"
244+
else
245+
WORKSPACE="nightly"
246+
BASE_COMMIT="$(echo "${{ env.LAST_RESULT_SHA }}" | cut -c 1-6)"
247+
fi
248+
COMPARE_COMMIT="$(echo "${{ env.COMMIT }}" | cut -c 1-6)"
249+
250+
cp ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini.dist ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
251+
sed -i "s|INFRA_DOCKER_REGISTRY=public.ecr.aws/abcdefgh|INFRA_DOCKER_REGISTRY=${{ secrets.PHP_VERSION_BENCHMARK_DOCKER_REGISTRY }}|g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
252+
sed -i "s|INFRA_WORKSPACE=|INFRA_WORKSPACE=$WORKSPACE|g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
253+
sed -i "s/INFRA_MEASURE_INSTRUCTION_COUNT=0/INFRA_MEASURE_INSTRUCTION_COUNT=${{ env.INSTRUCTION_COUNT }}/g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
254+
255+
cp ./php-version-benchmarks/build/infrastructure/config/aws.tfvars.dist ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
256+
sed -i 's/access_key = ""/access_key = "${{ secrets.PHP_VERSION_BENCHMARK_AWS_ACCESS_KEY }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
257+
sed -i 's/secret_key = ""/secret_key = "${{ secrets.PHP_VERSION_BENCHMARK_AWS_SECRET_KEY }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
258+
sed -i 's/state_bucket = ""/state_bucket = "${{ secrets.PHP_VERSION_BENCHMARK_STATE_BUCKET }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
259+
sed -i 's/github_token = ""/github_token = "${{ secrets.GITHUB_TOKEN }}"/g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
260+
261+
WORKFLOW_RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
262+
sed -i "s|log_url = \"\"|log_url = \"$WORKFLOW_RUN_URL\"|g" ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
263+
sed -i 's|artifact_url = ""|artifact_url = "#ARTIFACT_URL#"|g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
264+
265+
CHANGESET_URL="${{ github.server_url }}/${{ github.repository }}/compare/$BASE_COMMIT..$COMPARE_COMMIT"
266+
sed -i 's|extra_title = ""|extra_title = "Changeset"|g' ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
267+
sed -i "s|extra_text = \"\"|extra_text = \"$CHANGESET_URL\"|g" ./php-version-benchmarks/build/infrastructure/config/aws.tfvars
272268
- name: Run benchmark
273269
run: ./php-version-benchmarks/benchmark.sh run aws
274270
- name: Store results
@@ -288,12 +284,13 @@ jobs:
288284
fi
289285
git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
290286
git push
291-
- name: Upload artifact
292-
if: github.event_name == 'workflow_dispatch'
287+
- name: Upload artifacts
288+
id: upload
293289
uses: actions/upload-artifact@v6
294290
with:
295291
name: results
296-
path: ./php-version-benchmarks/docs/results/${{ env.YEAR }}
292+
path: |
293+
./php-version-benchmarks/tmp/results/${{ env.YEAR }}/**/*
297294
retention-days: 30
298295
- name: Comment results
299296
if: github.event_name == 'workflow_dispatch'
@@ -302,6 +299,7 @@ jobs:
302299
run: |
303300
cd ./php-version-benchmarks/tmp/php_${{ env.ID }}
304301
NEWEST_RESULT_DIRECTORY=$(ls -td ${{ github.workspace }}/php-version-benchmarks/docs/results/${{ env.YEAR }}/*/ | head -1)
302+
sed -i "s|#ARTIFACT_URL#|${{ steps.upload.outputs.artifact-url }}|g" "${NEWEST_RESULT_DIRECTORY}result.md"
305303
gh pr comment ${{ inputs.pull_request }} --body-file "${NEWEST_RESULT_DIRECTORY}result.md" --repo ${{ github.repository }}
306304
- name: Cleanup
307305
if: always()

NEWS

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ PHP NEWS
88
. It is now possible to use reference assign on WeakMap without the key
99
needing to be present beforehand. (ndossche)
1010
. Added `clamp()`. (kylekatarnls, thinkverse)
11+
. Fix OSS-Fuzz #429429090 (Failed assertion on unset() with uninitialized
12+
container). (ilutov)
13+
. Fixed GH-20564 (Don't call autoloaders with pending exception). (ilutov)
14+
15+
- Date:
16+
. Update timelib to 2022.16. (Derick)
17+
18+
- DOM:
19+
. Removed LIBXML_XINCLUDE from valid options for XMLDocument,
20+
as it was a no-op. (ndossche)
21+
22+
- Fileinfo:
23+
. Fixed bug GH-20679 (finfo_file() doesn't work on remote resources).
24+
(ndossche)
1125

1226
- Hash:
1327
. Upgrade xxHash to 0.8.2. (timwolla)
@@ -19,25 +33,33 @@ PHP NEWS
1933
. Fixed bug GH-20426 (Spoofchecker::setRestrictionLevel() error message
2034
suggests missing constants). (DanielEScherzer)
2135

22-
- Mbstring
23-
. Fixed bug GH-20674 (Fix GH-20674 mb_decode_mimeheader does not handle
24-
separator). (Yuya Hamada)
36+
- JSON:
37+
. Enriched JSON last error / exception message with error location.
38+
(Juan Morales)
2539

2640
- Fibers:
2741
. Fixed bug GH-20483 (ASAN stack overflow with fiber.stack_size INI
2842
small value). (David Carlier)
2943

44+
- Mail:
45+
. Fixed bug GH-20862 (null pointer dereference in
46+
php_mail_detect_multiple_crlf via error_log (jordikroon)
47+
3048
- Mbstring:
3149
. ini_set() with mbstring.detect_order changes the order of mb_detect_order
3250
as intended, since mbstring.detect_order is an INI_ALL setting. (tobee94)
3351
. Added GB18030-2022 to default encoding list for zh-CN. (HeRaNO)
34-
. Fixed bug GH-20674 (Fix GH-20674 mb_decode_mimeheader does not handle
35-
separator). (Yuya Hamada)
52+
. Fixed bug GH-20836 (Stack overflow in mb_convert_variables with
53+
recursive array references). (alexandre-daubois)
3654

3755
- Opcache:
3856
. Fixed bug GH-20051 (apache2 shutdowns when restart is requested during
3957
preloading). (Arnaud, welcomycozyhom)
4058

59+
- OpenSSL:
60+
. Implemented GH-20310 (No critical extension indication in
61+
openssl_x509_parse() output). (StephenWall)
62+
4163
- PDO_PGSQL:
4264
. Clear session-local state disconnect-equivalent processing.
4365
(KentarouTakeda)
@@ -48,6 +70,8 @@ PHP NEWS
4870
ignored. (ndossche)
4971
. Support overridden methods in SplFileInfo for getMTime() and getPathname()
5072
when building a phar. (ndossche)
73+
. Mark Phar::buildFromIterator() base directory argument as a path.
74+
(ndossche)
5175

5276
- Reflection:
5377
. Fixed bug GH-20217 (ReflectionClass::isIterable() incorrectly returns true
@@ -59,7 +83,9 @@ PHP NEWS
5983

6084
- Sockets:
6185
. Added the TCP_USER_TIMEOUT constant for Linux to set the maximum time in milliseconds
62-
transmitted data can remain unacknowledged. (James Lucas)
86+
transmitted data can remain unacknowledged. (James Lucas)
87+
. Added AF_UNSPEC support for sock_addrinfo_lookup() as a sole umbrella for
88+
AF_INET* family only. (David Carlier)
6389

6490
- SPL:
6591
. DirectoryIterator key can now work better with filesystem supporting larger
@@ -73,10 +99,13 @@ PHP NEWS
7399
while COW violation flag is still set). (alexandre-daubois)
74100

75101
- Streams:
102+
. Added so_keepalive, tcp_keepidle, tcp_keepintvl and tcp_keepcnt stream
103+
socket context options.
76104
. Added so_reuseaddr streams context socket option that allows disabling
77105
address resuse.
78106
. Fixed bug GH-20370 (User stream filters could violate typed property
79107
constraints). (alexandre-daubois)
108+
. Allowed filtered streams to be casted as fd for select. (Jakub Zelenka)
80109

81110
- Zip:
82111
. Fixed ZipArchive callback being called after executor has shut down.

0 commit comments

Comments
 (0)