Skip to content

Commit aea7809

Browse files
authored
Merge branch 'master' into sqlite3/exceptions-8.3
2 parents 6ec6d63 + 292e10b commit aea7809

File tree

735 files changed

+30240
-20642
lines changed

Some content is hidden

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

735 files changed

+30240
-20642
lines changed

.cirrus.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ asan_task:
184184
freebsd_task:
185185
name: FREEBSD_DEBUG_NTS
186186
freebsd_instance:
187-
image_family: freebsd-13-0
187+
image_family: freebsd-13-2
188188
env:
189189
ARCH: amd64
190190
install_script:
@@ -211,7 +211,7 @@ freebsd_task:
211211
arm_task:
212212
name: ARM_DEBUG_NTS
213213
arm_container:
214-
image: gcc:12
214+
image: debian:12
215215
additional_containers:
216216
- name: mysql
217217
image: mysql:8
@@ -233,6 +233,9 @@ arm_task:
233233
- apt-get update -y
234234
- >-
235235
apt-get install -y
236+
gcc
237+
g++
238+
autoconf
236239
bison
237240
re2c
238241
locales
@@ -249,6 +252,7 @@ arm_task:
249252
libsasl2-dev
250253
libxpm-dev
251254
libzip-dev
255+
libbz2-dev
252256
libsqlite3-dev
253257
libwebp-dev
254258
libonig-dev
@@ -385,6 +389,7 @@ arm_task:
385389
-d opcache.jit=function
386390
-P -q -x -j2
387391
-g FAIL,BORK,LEAK,XLEAK
392+
--no-progress
388393
--offline
389394
--show-diff
390395
--show-slow 1000
@@ -397,6 +402,7 @@ arm_task:
397402
-d opcache.jit=tracing
398403
-P -q -x -j2
399404
-g FAIL,BORK,LEAK,XLEAK
405+
--no-progress
400406
--offline
401407
--show-diff
402408
--show-slow 1000

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Collapse generated files within a pull request.
2323
**/*_arginfo.h linguist-generated
2424
/Zend/zend_vm_execute.h linguist-generated
25-
/Zend/zend_vm_opcodes.{h,c} linguist-generated
25+
/Zend/zend_vm_opcodes.[ch] linguist-generated
2626

2727
# The OSS fuzz files are bunary
2828
/ext/date/tests/ossfuzz*.txt binary

.github/actions/apt-x32/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ runs:
1313
apt-get install -y \
1414
autoconf \
1515
bison \
16+
curl \
1617
g++-multilib \
1718
gcc-multilib \
1819
language-pack-de \

.github/actions/brew/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ runs:
1212
re2c
1313
brew install \
1414
openssl@1.1 \
15+
curl \
1516
krb5 \
1617
bzip2 \
1718
enchant \

.github/actions/configure-macos/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ runs:
1111
set -x
1212
export PATH="/usr/local/opt/bison/bin:$PATH"
1313
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig"
14+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/curl/lib/pkgconfig"
1415
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig"
1516
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig"
1617
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"

.github/actions/notify-slack/action.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ inputs:
55
runs:
66
using: composite
77
steps:
8-
- name: Notify Slack
9-
if: always()
10-
uses: ravsamhq/notify-slack-action@v1
11-
with:
12-
status: ${{ job.status }}
13-
notify_when: 'failure'
14-
env:
15-
SLACK_WEBHOOK_URL: ${{ inputs.token }}
8+
- shell: bash
9+
run: >-
10+
curl -X POST -H 'Content-type: application/json' --data '{"attachments": [{"text": "Job in *nightly* failed", "footer": "<https://github.com/php/php-src/actions/runs/${{ github.run_id }}|View Run>", "color": "danger", "mrkdwn_in": ["text"]}]}' ${{ inputs.token }}

.github/labeler.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
- Zend/Optimizer/**/*
66

77
"Category: Build System":
8-
- build/*
8+
- '**/*.m4'
9+
- '**/*.w32'
10+
- build/**/*
11+
- buildconf
12+
- buildconf.bat
13+
- configure.ac
914
- scripts/**/*
15+
- win32/build/**/*
1016

1117
"Extension: bcmath":
1218
- ext/bcmath/**/*

.github/nightly_matrix.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function get_matrix_include(array $branches) {
5353
'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'",
5454
'run_tests_parameters' => '--asan',
5555
'test_function_jit' => false,
56+
'asan' => true,
5657
];
5758
if ($branch['ref'] !== 'PHP-8.0') {
5859
$jobs[] = [
@@ -63,6 +64,7 @@ function get_matrix_include(array $branches) {
6364
'run_tests_parameters' => '--repeat 2',
6465
'timeout_minutes' => 360,
6566
'test_function_jit' => true,
67+
'asan' => false,
6668
];
6769
$jobs[] = [
6870
'name' => '_VARIATION',
@@ -72,6 +74,7 @@ function get_matrix_include(array $branches) {
7274
'configuration_parameters' => "CFLAGS='-DZEND_RC_DEBUG=1 -DPROFITABILITY_CHECKS=0 -DZEND_VERIFY_FUNC_INFO=1'",
7375
'timeout_minutes' => 360,
7476
'test_function_jit' => true,
77+
'asan' => false,
7578
];
7679
}
7780
}

.github/scripts/setup-slapd.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldap
4242
# Configure LDAP database.
4343
DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`;
4444

45+
if test -f "/etc/ldap/schema/ppolicy.ldif"; then
46+
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
47+
fi
48+
4549
sudo service slapd restart
4650

4751
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF

.github/workflows/nightly.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
id: set-matrix
3434
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}"
3535
- name: Notify Slack
36-
if: always()
36+
if: failure()
3737
uses: ./.github/actions/notify-slack
3838
with:
3939
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -59,7 +59,7 @@ jobs:
5959
zts: [true, false]
6060
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.matrix-include) }}
6161
name: "${{ matrix.branch.name }}_LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
62-
runs-on: ubuntu-${{ matrix.branch.ref == 'master' && '22.04' || '20.04' }}
62+
runs-on: ubuntu-${{ (matrix.branch.ref == 'master' && !matrix.asan) && '22.04' || '20.04' }}
6363
steps:
6464
- name: git checkout
6565
uses: actions/checkout@v3
@@ -123,7 +123,7 @@ jobs:
123123
- name: Verify generated files are up to date
124124
uses: ./.github/actions/verify-generated-files
125125
- name: Notify Slack
126-
if: always()
126+
if: failure()
127127
uses: ./.github/actions/notify-slack
128128
with:
129129
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -199,7 +199,7 @@ jobs:
199199
-d opcache.jit_buffer_size=16M
200200
-d opcache.jit=1205
201201
- name: Notify Slack
202-
if: always()
202+
if: failure()
203203
uses: ./.github/actions/notify-slack
204204
with:
205205
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -267,7 +267,7 @@ jobs:
267267
- name: Verify generated files are up to date
268268
uses: ./.github/actions/verify-generated-files
269269
- name: Notify Slack
270-
if: always()
270+
if: failure()
271271
uses: ./.github/actions/notify-slack
272272
with:
273273
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -313,7 +313,7 @@ jobs:
313313
if: always()
314314
run: bash <(curl -s https://codecov.io/bash)
315315
- name: Notify Slack
316-
if: always()
316+
if: failure()
317317
uses: ./.github/actions/notify-slack
318318
with:
319319
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -433,7 +433,7 @@ jobs:
433433
exit 1
434434
fi
435435
- name: Notify Slack
436-
if: always()
436+
if: failure()
437437
uses: ./.github/actions/notify-slack
438438
with:
439439
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -516,7 +516,7 @@ jobs:
516516
- name: Verify generated files are up to date
517517
uses: ./.github/actions/verify-generated-files
518518
- name: Notify Slack
519-
if: always()
519+
if: failure()
520520
uses: ./.github/actions/notify-slack
521521
with:
522522
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -614,7 +614,7 @@ jobs:
614614
- name: Verify generated files are up to date
615615
uses: ./.github/actions/verify-generated-files
616616
- name: Notify Slack
617-
if: always()
617+
if: failure()
618618
uses: ./.github/actions/notify-slack
619619
with:
620620
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -665,7 +665,7 @@ jobs:
665665
with:
666666
# FIXME: There are new warnings
667667
# configurationParameters: --enable-werror
668-
libmysql: mysql-8.0.30-linux-glibc2.12-x86_64.tar.xz
668+
libmysql: mysql-8.0.33-linux-glibc2.12-x86_64.tar.xz
669669
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
670670
- name: Test mysql-8.0
671671
uses: ./.github/actions/test-libmysqlclient
@@ -674,7 +674,7 @@ jobs:
674674
- name: Verify generated files are up to date
675675
uses: ./.github/actions/verify-generated-files
676676
- name: Notify Slack
677-
if: always()
677+
if: failure()
678678
uses: ./.github/actions/notify-slack
679679
with:
680680
token: ${{ secrets.ACTION_MONITORING_SLACK }}
@@ -782,7 +782,7 @@ jobs:
782782
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
783783
make -j$(/usr/bin/nproc)
784784
- name: Notify Slack
785-
if: always()
785+
if: failure()
786786
uses: ./.github/actions/notify-slack
787787
with:
788788
token: ${{ secrets.ACTION_MONITORING_SLACK }}

.github/workflows/push.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,98 @@ jobs:
215215
run: .github/scripts/windows/build.bat
216216
- name: Test
217217
run: .github/scripts/windows/test.bat
218+
BENCHMARKING:
219+
name: BENCHMARKING
220+
if: github.repository_owner == 'php' || github.event_name == 'pull_request'
221+
runs-on: ubuntu-22.04
222+
steps:
223+
- name: git checkout
224+
uses: actions/checkout@v3
225+
with:
226+
fetch-depth: 0
227+
- name: apt
228+
run: |
229+
set -x
230+
sudo apt-get update
231+
sudo apt-get install \
232+
bison \
233+
libgmp-dev \
234+
libonig-dev \
235+
libsqlite3-dev \
236+
openssl \
237+
re2c \
238+
valgrind
239+
- name: ccache
240+
uses: hendrikmuhs/ccache-action@v1.2
241+
with:
242+
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
243+
append-timestamp: false
244+
- name: ./configure
245+
run: |
246+
set -x
247+
./buildconf --force
248+
./configure \
249+
--disable-debug \
250+
--enable-mbstring \
251+
--enable-opcache \
252+
--enable-option-checking=fatal \
253+
--enable-sockets \
254+
--enable-werror \
255+
--prefix=/usr \
256+
--with-config-file-scan-dir=/etc/php.d \
257+
--with-gmp \
258+
--with-mysqli=mysqlnd \
259+
--with-openssl \
260+
--with-pdo-sqlite \
261+
--with-valgrind
262+
- name: make
263+
run: make -j$(/usr/bin/nproc) >/dev/null
264+
- name: make install
265+
run: |
266+
set -x
267+
sudo make install
268+
sudo mkdir -p /etc/php.d
269+
sudo chmod 777 /etc/php.d
270+
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
271+
echo zend_extension=opcache.so >> /etc/php.d/opcache.ini
272+
echo opcache.enable=1 >> /etc/php.d/opcache.ini
273+
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
274+
- name: Setup
275+
run: |
276+
git config --global user.name "Benchmark"
277+
git config --global user.email "benchmark@php.net"
278+
sudo service mysql start
279+
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress"
280+
mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
281+
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
282+
- name: git checkout benchmarking-data
283+
uses: actions/checkout@v3
284+
with:
285+
repository: php/benchmarking-data
286+
ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
287+
path: benchmark/repos/data
288+
- name: Benchmark
289+
run: php benchmark/benchmark.php true
290+
- name: Store result
291+
if: github.event_name == 'push'
292+
run: |
293+
set -x
294+
cd benchmark/repos/data
295+
git pull --autostash
296+
if [ -e ".git/MERGE_HEAD" ]; then
297+
echo "Merging, can't proceed"
298+
exit 1
299+
fi
300+
git add .
301+
if git diff --cached --quiet; then
302+
exit 0
303+
fi
304+
git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
305+
git push
306+
- name: Show diff
307+
if: github.event_name == 'pull_request'
308+
run: |-
309+
php benchmark/generate_diff.php \
310+
${{ github.sha }} \
311+
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
312+
> $GITHUB_STEP_SUMMARY

CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@
1414
/ext/curl @adoy
1515
/ext/date @derickr
1616
/ext/dba @Girgias
17+
/ext/dom @nielsdos
1718
/ext/ffi @dstogov
1819
/ext/gmp @Girgias
1920
/ext/imap @Girgias
2021
/ext/json @bukka
22+
/ext/libxml @nielsdos
2123
/ext/mbstring @alexdowad
2224
/ext/opcache @dstogov @iluuu1994
2325
/ext/openssl @bukka
2426
/ext/pgsql @devnexen
25-
/ext/random @TimWolla
27+
/ext/random @TimWolla @zeriyoshi
2628
/ext/session @Girgias
2729
/ext/sockets @devnexen
2830
/ext/spl @Girgias
31+
/ext/standard @bukka
2932
/main @bukka
3033
/sapi/fpm @bukka
3134
/Zend @iluuu1994

0 commit comments

Comments
 (0)