Skip to content

Commit 5dc5528

Browse files
committed
Merge tag 'php-8.2.28' into was-8.2.x
Tag for php-8.2.28
2 parents 0446bad + 997ec63 commit 5dc5528

File tree

144 files changed

+2150
-659
lines changed

Some content is hidden

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

144 files changed

+2150
-659
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ jobs:
166166
`#--enable-werror`
167167
- run:
168168
name: make
169+
no_output_timeout: 30m
169170
command: make -j2 > /dev/null
170171
- run:
171172
name: make install
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: ./configure
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
skipSlow:
7+
default: false
8+
required: false
9+
runs:
10+
using: composite
11+
steps:
12+
- shell: bash
13+
run: |
14+
set -x
15+
./buildconf --force
16+
./configure \
17+
--enable-option-checking=fatal \
18+
--prefix=/usr \
19+
--with-libdir=lib64 \
20+
--enable-phpdbg \
21+
--enable-fpm \
22+
--with-pdo-mysql=mysqlnd \
23+
--with-mysqli=mysqlnd \
24+
${{ inputs.skipSlow == 'false' && '--with-pgsql' || '' }} \
25+
${{ inputs.skipSlow == 'false' && '--with-pdo-pgsql' || '' }} \
26+
${{ inputs.skipSlow == 'false' && '--with-pdo-sqlite' || '' }} \
27+
--enable-intl \
28+
--without-pear \
29+
--enable-gd \
30+
--with-jpeg \
31+
--with-webp \
32+
--with-freetype \
33+
--with-xpm \
34+
--enable-exif \
35+
--with-zip \
36+
--with-zlib \
37+
--enable-soap \
38+
--enable-xmlreader \
39+
--with-xsl \
40+
${{ inputs.skipSlow == 'false' && '--with-tidy' || '' }} \
41+
--enable-sysvsem \
42+
--enable-sysvshm \
43+
--enable-shmop \
44+
--enable-pcntl \
45+
--with-readline \
46+
--enable-mbstring \
47+
--with-iconv \
48+
--with-curl \
49+
--with-gettext \
50+
--enable-sockets \
51+
--with-bz2 \
52+
--with-openssl \
53+
--with-gmp \
54+
--enable-bcmath \
55+
--enable-calendar \
56+
--enable-ftp \
57+
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
58+
--enable-sysvmsg \
59+
--with-ffi \
60+
--enable-zend-test \
61+
${{ inputs.skipSlow == 'false' && '--enable-dl-test=shared' || '' }} \
62+
${{ inputs.skipSlow == 'false' && '--with-ldap' || '' }} \
63+
${{ inputs.skipSlow == 'false' && '--with-ldap-sasl' || '' }} \
64+
--with-password-argon2 \
65+
--with-mhash \
66+
--with-sodium \
67+
--enable-dba \
68+
--with-cdb \
69+
--enable-flatfile \
70+
--enable-inifile \
71+
--with-tcadb \
72+
--with-lmdb \
73+
--with-qdbm \
74+
${{ inputs.skipSlow == 'false' && '--with-snmp' || '' }} \
75+
${{ inputs.skipSlow == 'false' && '--with-unixODBC' || '' }} \
76+
${{ inputs.skipSlow == 'false' && '--with-pdo-odbc=unixODBC,/usr' || '' }} \
77+
--with-config-file-path=/etc \
78+
--with-config-file-scan-dir=/etc/php.d \
79+
${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \
80+
--enable-werror \
81+
${{ inputs.configurationParameters }} || cat config.log

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ runs:
33
using: composite
44
steps:
55
- name: Setup MySQL
6-
shell: pwsh
6+
shell: cmd
77
run: |
8-
choco install mysql -y --no-progress --params="/port:3306"
9-
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
8+
mysqld --initialize-insecure
9+
mysqld --install
10+
net start MySQL
11+
mysql --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
1012
- name: Setup MSSQL
1113
shell: pwsh
1214
run: |
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test
2+
inputs:
3+
runTestsParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
set -x
12+
# XXX: Set up other database tests?
13+
# XXX: These tests are not running containerized
14+
export MYSQL_TEST_USER=ci
15+
export MYSQL_TEST_PASSWD=ci
16+
if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
17+
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
18+
fi
19+
export PDO_MYSQL_TEST_USER=ci
20+
export PDO_MYSQL_TEST_PASS=ci
21+
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=ci password=ci"
22+
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
23+
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=ci password=ci"
24+
fi
25+
# Slow tests criteron is doubled because this runner isn't as fast as others
26+
export SKIP_IO_CAPTURE_TESTS=1
27+
export STACK_LIMIT_DEFAULTS_CHECK=1
28+
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
29+
-j$(nproc) \
30+
-g FAIL,BORK,LEAK,XLEAK \
31+
--no-progress \
32+
--show-diff \
33+
--show-slow 2000 \
34+
--set-timeout 120

.github/lsan-suppressions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
leak:acommon::DictInfoList::elements
2+
leak:netsnmp_init_mib_internals

.github/scripts/setup-slapd.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
set -ex
2+
set -e
33

44
# Create TLS certificate
55
sudo mkdir -p /etc/ldap/ssl
@@ -42,7 +42,9 @@ 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-
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
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
4648

4749
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF
4850
dn: $DBDN

.github/scripts/windows/test_task.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ rem generate php.ini
126126
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
127127
echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini
128128
if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini
129-
rem work-around for some spawned PHP processes requiring OpenSSL
129+
rem work-around for some spawned PHP processes requiring OpenSSL and sockets
130130
echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini
131+
echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini
131132

132133
rem remove ext dlls for which tests are not supported
133134
for %%i in (ldap oci8_12c pdo_oci) do (

.github/workflows/nightly.yml

Lines changed: 78 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
run_alpine:
1818
required: true
1919
type: boolean
20+
run_linux_ppc64:
21+
required: true
22+
type: boolean
2023
run_macos_arm64:
2124
required: true
2225
type: boolean
@@ -26,9 +29,53 @@ on:
2629
windows_version:
2730
required: true
2831
type: string
32+
skip_symfony:
33+
required: true
34+
type: boolean
35+
skip_wordpress:
36+
required: true
37+
type: boolean
2938
permissions:
3039
contents: read
3140
jobs:
41+
LINUX_PPC64:
42+
if: inputs.run_linux_ppc64
43+
name: LINUX_PPC64_ASAN_UBSAN_DEBUG_ZTS
44+
# This runs on a self-hosted runner; see https://wiki.php.net/systems/ci
45+
runs-on: [self-hosted, gentoo, ppc64]
46+
steps:
47+
- name: git checkout
48+
uses: actions/checkout@v4
49+
with:
50+
ref: ${{ inputs.branch }}
51+
- name: System info
52+
run: |
53+
echo "::group::Show host CPU info"
54+
lscpu
55+
echo "::endgroup::"
56+
echo "::group::Show installed packages"
57+
cat /var/lib/portage/world
58+
echo "::endgroup::"
59+
- name: ./configure
60+
uses: ./.github/actions/configure-gentoo
61+
with:
62+
configurationParameters: >-
63+
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
64+
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
65+
CC=clang-17
66+
CXX=clang++-17
67+
--enable-debug
68+
--enable-zts
69+
skipSlow: false # FIXME: This should likely include slow extensions
70+
- name: make
71+
run: make -j$(/usr/bin/nproc) >/dev/null
72+
# Skip an install action for now
73+
- name: Tests
74+
uses: ./.github/actions/test-gentoo
75+
# There is no PPC JIT, so rip this out
76+
with:
77+
runTestsParameters: >-
78+
--asan -x
3279
ALPINE:
3380
if: inputs.run_alpine
3481
name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS
@@ -227,6 +274,8 @@ jobs:
227274
runs-on: ubuntu-latest
228275
container:
229276
image: ubuntu:${{ inputs.ubuntu_version }}
277+
env:
278+
PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb
230279
services:
231280
mysql:
232281
image: mysql:8.3
@@ -235,6 +284,15 @@ jobs:
235284
env:
236285
MYSQL_DATABASE: test
237286
MYSQL_ROOT_PASSWORD: root
287+
firebird:
288+
image: jacobalberty/firebird
289+
ports:
290+
- 3050:3050
291+
env:
292+
ISC_PASSWORD: test
293+
FIREBIRD_DATABASE: test.fdb
294+
FIREBIRD_USER: test
295+
FIREBIRD_PASSWORD: test
238296
steps:
239297
- name: git checkout
240298
uses: actions/checkout@v4
@@ -410,7 +468,7 @@ jobs:
410468
-d zend_extension=opcache.so
411469
-d opcache.enable_cli=1
412470
- uses: codecov/codecov-action@v4
413-
if: always()
471+
if: ${{ !cancelled() }}
414472
with:
415473
fail_ci_if_error: true
416474
token: ${{ secrets.CODECOV_TOKEN }}
@@ -483,7 +541,7 @@ jobs:
483541
echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini
484542
php -v
485543
- name: Test AMPHP
486-
if: always()
544+
if: ${{ !cancelled() }}
487545
run: |
488546
repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server"
489547
X=0
@@ -501,9 +559,9 @@ jobs:
501559
done
502560
exit $X
503561
- name: Test Laravel
504-
if: always()
562+
if: ${{ !cancelled() }}
505563
run: |
506-
git clone https://github.com/laravel/framework.git --branch=master --depth=1
564+
git clone https://github.com/laravel/framework.git --depth=1
507565
cd framework
508566
git rev-parse HEAD
509567
php /usr/bin/composer install --no-progress --ignore-platform-reqs
@@ -514,7 +572,7 @@ jobs:
514572
exit 1
515573
fi
516574
- name: Test ReactPHP
517-
if: always()
575+
if: ${{ !cancelled() }}
518576
run: |
519577
repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream"
520578
X=0
@@ -532,7 +590,7 @@ jobs:
532590
done
533591
exit $X
534592
- name: Test Revolt PHP
535-
if: always()
593+
if: ${{ !cancelled() }}
536594
run: |
537595
git clone https://github.com/revoltphp/event-loop.git --depth=1
538596
cd event-loop
@@ -543,7 +601,7 @@ jobs:
543601
exit 1
544602
fi
545603
- name: Test Symfony
546-
if: always()
604+
if: ${{ !cancelled() && !inputs.skip_symfony }}
547605
run: |
548606
git clone https://github.com/symfony/symfony.git --depth=1
549607
cd symfony
@@ -564,7 +622,7 @@ jobs:
564622
done
565623
exit $X
566624
- name: Test PHPUnit
567-
if: always()
625+
if: ${{ !cancelled() }}
568626
run: |
569627
git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
570628
cd phpunit
@@ -575,15 +633,15 @@ jobs:
575633
exit 1
576634
fi
577635
- name: 'Symfony Preloading'
578-
if: always()
636+
if: ${{ !cancelled() && !inputs.skip_symfony }}
579637
run: |
580638
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
581639
cd symfony_demo
582640
git rev-parse HEAD
583641
sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
584642
php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php
585643
- name: Test Wordpress
586-
if: always()
644+
if: ${{ !cancelled() && !inputs.skip_wordpress }}
587645
run: |
588646
git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1
589647
cd wordpress
@@ -952,10 +1010,18 @@ jobs:
9521010
- x64: true
9531011
zts: true
9541012
opcache: true
1013+
asan: false
9551014
- x64: false
9561015
zts: false
9571016
opcache: false
958-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
1017+
asan: false
1018+
- x64: true
1019+
zts: true
1020+
opcache: true
1021+
asan: true
1022+
branch: 'master'
1023+
timeout: 120
1024+
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
9591025
runs-on: windows-${{ inputs.windows_version }}
9601026
env:
9611027
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
@@ -968,6 +1034,7 @@ jobs:
9681034
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
9691035
PARALLEL: -j2
9701036
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
1037+
ASAN: "${{ matrix.asan && '1' || '0' }}"
9711038
steps:
9721039
- name: git config
9731040
run: git config --global core.autocrlf false && git config --global core.eol lf

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- debug: false
7070
zts: true
7171
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
72-
runs-on: ubuntu-20.04
72+
runs-on: ubuntu-22.04
7373
steps:
7474
- name: git checkout
7575
uses: actions/checkout@v4

0 commit comments

Comments
 (0)