Skip to content

Commit cd0177f

Browse files
committed
Merge remote-tracking branch 'origin/master' into opcache/opcache_is_script_cached_file
2 parents 17edbe6 + caf5e8a commit cd0177f

File tree

801 files changed

+27379
-16191
lines changed

Some content is hidden

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

801 files changed

+27379
-16191
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ max_line_length = 80
3232

3333
[*.patch]
3434
trim_trailing_whitespace = false
35+
36+
[*.rst]
37+
indent_style = space
38+
max_line_length = 100

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ runs:
3838
libxml2-dev:i386 \
3939
libxpm-dev:i386 \
4040
libxslt1-dev:i386 \
41+
firebird-dev:i386 \
4142
locales \
4243
make \
4344
pkg-config:i386 \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ runs:
2727
--with-pgsql \
2828
--with-pdo-pgsql \
2929
--with-pdo-sqlite \
30+
--with-pdo-firebird \
3031
--without-pear \
3132
--enable-gd \
3233
--with-jpeg \

.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: |

.github/actions/test-linux/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ runs:
3030
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
3131
fi
3232
export PDO_FIREBIRD_TEST_DATABASE=test.fdb
33-
export PDO_FIREBIRD_TEST_DSN=firebird:dbname=localhost:test.fdb
33+
if [[ -z "$PDO_FIREBIRD_TEST_DSN" ]]; then
34+
export PDO_FIREBIRD_TEST_DSN=firebird:dbname=localhost:test.fdb
35+
fi
3436
export PDO_FIREBIRD_TEST_PASS=test
3537
export PDO_FIREBIRD_TEST_USER=test
3638
export ODBC_TEST_USER="odbc_test"

.github/lsan-suppressions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
leak:acommon::DictInfoList::elements
22
leak:timer_create
33
leak:netsnmp_init_mib_internals
4+
leak:isc_attach_database

.github/scripts/windows/build_task.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ if %errorlevel% neq 0 exit /b 3
3030

3131
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
3232
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
33+
if "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack
3334

34-
set CFLAGS=/W1 /WX
35+
set CFLAGS=/W2 /WX /w14013 /wd4146 /wd4244
3536

3637
cmd /c configure.bat ^
3738
--enable-snapshot-build ^

.github/scripts/windows/test_task.bat

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,26 @@ rem generate php.ini
123123
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
124124
echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini
125125
if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini
126-
rem work-around for some spawned PHP processes requiring OpenSSL
126+
rem work-around for some spawned PHP processes requiring OpenSSL and sockets
127127
echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini
128+
echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini
128129

129130
rem remove ext dlls for which tests are not supported
130131
for %%i in (ldap) do (
131132
del %PHP_BUILD_DIR%\php_%%i.dll
132133
)
133134

135+
rem reduce excessive stack reserve for testing
136+
editbin /stack:8388608 %PHP_BUILD_DIR%\php.exe
137+
editbin /stack:8388608 %PHP_BUILD_DIR%\php-cgi.exe
138+
134139
set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe
135140

141+
if "%ASAN%" equ "1" set ASAN_OPTS=--asan
142+
136143
mkdir c:\tests_tmp
137144

138-
nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK --no-progress -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%"
145+
nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK %ASAN_OPTS% --no-progress -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%"
139146

140147
set EXIT_CODE=%errorlevel%
141148

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
- name: git checkout
2020
uses: actions/checkout@v4
2121
- name: Install dependencies
22-
run: pip install sphinx-design sphinxawesome-theme rstfmt
22+
run: pip install -r docs/requirements.txt
2323
- name: Check formatting
24-
run: rstfmt --check -w 100 docs/source
24+
run: make -C docs check-formatting
2525
- name: Publish
2626
if: github.event_name == 'push'
2727
uses: sphinx-notes/pages@v3

.github/workflows/nightly.yml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ on:
2626
windows_version:
2727
required: true
2828
type: string
29+
skip_symfony:
30+
required: true
31+
type: boolean
32+
skip_wordpress:
33+
required: true
34+
type: boolean
2935
permissions:
3036
contents: read
3137
jobs:
@@ -227,6 +233,8 @@ jobs:
227233
runs-on: ubuntu-latest
228234
container:
229235
image: ubuntu:${{ inputs.ubuntu_version }}
236+
env:
237+
PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb
230238
services:
231239
mysql:
232240
image: mysql:8.3
@@ -235,6 +243,15 @@ jobs:
235243
env:
236244
MYSQL_DATABASE: test
237245
MYSQL_ROOT_PASSWORD: root
246+
firebird:
247+
image: jacobalberty/firebird
248+
ports:
249+
- 3050:3050
250+
env:
251+
ISC_PASSWORD: test
252+
FIREBIRD_DATABASE: test.fdb
253+
FIREBIRD_USER: test
254+
FIREBIRD_PASSWORD: test
238255
steps:
239256
- name: git checkout
240257
uses: actions/checkout@v4
@@ -410,7 +427,7 @@ jobs:
410427
-d zend_extension=opcache.so
411428
-d opcache.enable_cli=1
412429
- uses: codecov/codecov-action@v4
413-
if: always()
430+
if: ${{ !cancelled() }}
414431
with:
415432
fail_ci_if_error: true
416433
token: ${{ secrets.CODECOV_TOKEN }}
@@ -483,7 +500,7 @@ jobs:
483500
echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini
484501
php -v
485502
- name: Test AMPHP
486-
if: always()
503+
if: ${{ !cancelled() }}
487504
run: |
488505
repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server"
489506
X=0
@@ -501,7 +518,7 @@ jobs:
501518
done
502519
exit $X
503520
- name: Test Laravel
504-
if: always()
521+
if: ${{ !cancelled() }}
505522
run: |
506523
git clone https://github.com/laravel/framework.git --branch=master --depth=1
507524
cd framework
@@ -514,7 +531,7 @@ jobs:
514531
exit 1
515532
fi
516533
- name: Test ReactPHP
517-
if: always()
534+
if: ${{ !cancelled() }}
518535
run: |
519536
repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream"
520537
X=0
@@ -532,7 +549,7 @@ jobs:
532549
done
533550
exit $X
534551
- name: Test Revolt PHP
535-
if: always()
552+
if: ${{ !cancelled() }}
536553
run: |
537554
git clone https://github.com/revoltphp/event-loop.git --depth=1
538555
cd event-loop
@@ -543,7 +560,7 @@ jobs:
543560
exit 1
544561
fi
545562
- name: Test Symfony
546-
if: always()
563+
if: ${{ !cancelled() && !inputs.skip_symfony }}
547564
run: |
548565
git clone https://github.com/symfony/symfony.git --depth=1
549566
cd symfony
@@ -564,7 +581,7 @@ jobs:
564581
done
565582
exit $X
566583
- name: Test PHPUnit
567-
if: always()
584+
if: ${{ !cancelled() }}
568585
run: |
569586
git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
570587
cd phpunit
@@ -575,15 +592,15 @@ jobs:
575592
exit 1
576593
fi
577594
- name: 'Symfony Preloading'
578-
if: always()
595+
if: ${{ !cancelled() && !inputs.skip_symfony }}
579596
run: |
580597
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
581598
cd symfony_demo
582599
git rev-parse HEAD
583600
sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
584601
php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php
585602
- name: Test Wordpress
586-
if: always()
603+
if: ${{ !cancelled() && !inputs.skip_wordpress }}
587604
run: |
588605
git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1
589606
cd wordpress
@@ -952,10 +969,18 @@ jobs:
952969
- x64: true
953970
zts: true
954971
opcache: true
972+
asan: false
955973
- x64: false
956974
zts: false
957975
opcache: false
958-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
976+
asan: false
977+
- x64: true
978+
zts: true
979+
opcache: true
980+
asan: true
981+
branch: 'master'
982+
timeout: 120
983+
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
959984
runs-on: windows-${{ inputs.windows_version }}
960985
env:
961986
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
@@ -968,6 +993,7 @@ jobs:
968993
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
969994
PARALLEL: -j2
970995
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
996+
ASAN: "${{ matrix.asan && '1' || '0' }}"
971997
steps:
972998
- name: git config
973999
run: git config --global core.autocrlf false && git config --global core.eol lf

.github/workflows/push.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
MYSQL_TEST_HOST: mysql
148148
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
149149
PDO_MYSQL_TEST_HOST: mysql
150+
PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb
150151
services:
151152
mysql:
152153
image: mysql:8.3
@@ -155,6 +156,15 @@ jobs:
155156
env:
156157
MYSQL_DATABASE: test
157158
MYSQL_ROOT_PASSWORD: root
159+
firebird:
160+
image: jacobalberty/firebird
161+
ports:
162+
- 3050:3050
163+
env:
164+
ISC_PASSWORD: test
165+
FIREBIRD_DATABASE: test.fdb
166+
FIREBIRD_USER: test
167+
FIREBIRD_PASSWORD: test
158168
steps:
159169
- name: git checkout
160170
uses: actions/checkout@v4
@@ -188,8 +198,6 @@ jobs:
188198
fail-fast: false
189199
matrix:
190200
include:
191-
- os: 13
192-
arch: X64
193201
- os: 14
194202
arch: ARM64
195203
name: MACOS_${{ matrix.arch }}_DEBUG_NTS

.github/workflows/root.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,6 @@ jobs:
5959
|| ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04')
6060
|| '20.04' }}
6161
windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
62+
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
63+
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6264
secrets: inherit

.github/workflows/windows-builds.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Windows builds
2+
run-name: Windows builds for ${{ inputs.tag || github.ref_name }}
3+
on:
4+
push:
5+
tags:
6+
- 'php-*'
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Tag version'
11+
required: true
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
name: Build
17+
steps:
18+
- name: Build
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.WINDOWS_BUILDS_TOKEN }}
21+
run: |
22+
TAG="${{ inputs.tag || github.ref_name }}"
23+
gh workflow run php.yml -R php/php-windows-builder -f php-version="${TAG#php-}"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ php
177177
/ext/*/configure.ac
178178
/ext/*/run-tests.php
179179

180+
# Generated by ./configure if libc might be musl
181+
/ext/gettext/tests/locale/en_US
182+
180183
# ------------------------------------------------------------------------------
181184
# Generated by Windows build system
182185
# ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)