Skip to content

Commit 1e7ef11

Browse files
committed
Merge tag 'php-8.1.31' into was-8.1.x
Tag for php-8.1.31
2 parents f6a318a + 38123ac commit 1e7ef11

File tree

141 files changed

+3021
-360
lines changed

Some content is hidden

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

141 files changed

+3021
-360
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44
freebsd_task:
55
name: FREEBSD_DEBUG_NTS
66
freebsd_instance:
7-
image_family: freebsd-13-2
7+
image_family: freebsd-13-3
88
env:
99
ARCH: amd64
1010
install_script:
@@ -14,7 +14,7 @@ freebsd_task:
1414
- pkg install -y autoconf bison gmake re2c icu libiconv png freetype2 enchant2 bzip2 krb5 t1lib gmp tidyp libsodium libzip libxml2 libxslt openssl oniguruma pkgconf webp libavif
1515
script:
1616
- ./buildconf -f
17-
- ./configure --prefix=/usr/local --enable-debug --enable-option-checking=fatal --enable-fpm --with-pdo-sqlite --without-pear --with-bz2 --with-avif --with-jpeg --with-webp --with-freetype --enable-gd --enable-exif --with-zip --with-zlib --enable-soap --enable-xmlreader --with-xsl --with-libxml --enable-shmop --enable-pcntl --enable-mbstring --with-curl --enable-sockets --with-openssl --with-iconv=/usr/local --enable-bcmath --enable-calendar --enable-ftp --with-kerberos --with-ffi --enable-zend-test --enable-dl-test=shared --enable-intl --with-mhash --with-sodium --enable-werror --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
17+
- ./configure CFLAGS="-Wno-strict-prototypes -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Wno-unused-result" --prefix=/usr/local --enable-debug --enable-option-checking=fatal --enable-fpm --with-pdo-sqlite --without-pear --with-bz2 --with-avif --with-jpeg --with-webp --with-freetype --enable-gd --enable-exif --with-zip --with-zlib --enable-soap --enable-xmlreader --with-xsl --with-libxml --enable-shmop --enable-pcntl --enable-mbstring --with-curl --enable-sockets --with-openssl --with-iconv=/usr/local --enable-bcmath --enable-calendar --enable-ftp --with-kerberos --with-ffi --enable-zend-test --enable-dl-test=shared --enable-intl --with-mhash --with-sodium --enable-werror --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
1818
- gmake -j2
1919
- mkdir /etc/php.d
2020
- gmake install

.github/actions/brew/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ runs:
2121
webp \
2222
freetype \
2323
intltool \
24-
icu4c \
2524
libiconv \
2625
zlib \
2726
t1lib \
@@ -33,4 +32,5 @@ runs:
3332
libjpeg \
3433
libxslt \
3534
postgresql
35+
brew reinstall icu4c@74
3636
brew link icu4c gettext --force

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ runs:
99
- shell: bash
1010
run: |
1111
set -x
12+
BREW_OPT="$(brew --prefix)"/opt
1213
export PATH="/usr/local/opt/bison/bin:$PATH"
1314
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/[email protected]/lib/pkgconfig"
1415
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/curl/lib/pkgconfig"
@@ -17,9 +18,11 @@ runs:
1718
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"
1819
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxslt/lib/pkgconfig"
1920
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/zlib/lib/pkgconfig"
20-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig"
21+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c@74/lib/pkgconfig"
22+
sed -i -e 's/Requires.private:.*//g' "$BREW_OPT/curl/lib/pkgconfig/libcurl.pc"
2123
./buildconf --force
2224
./configure \
25+
CFLAGS="-Wno-strict-prototypes -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion" \
2326
--enable-option-checking=fatal \
2427
--prefix=/usr/local \
2528
--enable-fpm \

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ runs:
1313
-d gvenzl/oracle-xe:slim
1414
1515
mkdir /opt/oracle
16-
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
17-
unzip instantclient-basiclite-linuxx64.zip && rm instantclient-basiclite-linuxx64.zip
18-
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
19-
unzip instantclient-sdk-linuxx64.zip && rm instantclient-sdk-linuxx64.zip
16+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/2114000/instantclient-basiclite-linux.x64-21.14.0.0.0dbru.zip
17+
unzip instantclient-basiclite-linux.x64-21.14.0.0.0dbru.zip && rm instantclient-basiclite-linux.x64-21.14.0.0.0dbru.zip
18+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/2114000/instantclient-sdk-linux.x64-21.14.0.0.0dbru.zip
19+
unzip instantclient-sdk-linux.x64-21.14.0.0.0dbru.zip && rm instantclient-sdk-linux.x64-21.14.0.0.0dbru.zip
2020
mv instantclient_*_* /opt/oracle/instantclient
2121
# interferes with libldap2 headers
2222
rm /opt/oracle/instantclient/sdk/include/ldap.h

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@ runs:
66
run: |
77
set -x
88
9-
sudo service mysql start
10-
sudo service postgresql start
119
sudo service slapd start
12-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
13-
# Ensure local_infile tests can run.
14-
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
15-
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
16-
sudo -u postgres psql -c "CREATE DATABASE test;"
1710
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
1811
sudo locale-gen de_DE
1912

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ runs:
2828
export PDO_OCI_TEST_USER="system"
2929
export PDO_OCI_TEST_PASS="pass"
3030
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
31+
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=postgres password=postgres"
32+
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
33+
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
34+
fi
3135
export SKIP_IO_CAPTURE_TESTS=1
3236
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
3337
-d opcache.jit=${{ inputs.jitType }} \

.github/nightly_matrix.php

Lines changed: 30 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
<?php
22

3-
const BRANCHES = ['master', 'PHP-8.1', 'PHP-8.0'];
3+
const BRANCHES = [
4+
['ref' => 'master', 'version' => [8, 5]],
5+
['ref' => 'PHP-8.4', 'version' => [8, 4]],
6+
['ref' => 'PHP-8.3', 'version' => [8, 3]],
7+
['ref' => 'PHP-8.2', 'version' => [8, 2]],
8+
['ref' => 'PHP-8.1', 'version' => [8, 1]],
9+
];
410

511
function get_branch_commit_cache_file_path(): string {
612
return dirname(__DIR__) . '/branch-commit-cache.json';
713
}
814

9-
function get_branch_matrix(array $branches) {
10-
$result = array_map(function ($branch) {
11-
$branch_key = strtoupper(str_replace('.', '', $branch));
12-
return [
13-
'name' => $branch_key,
14-
'ref' => $branch,
15-
];
16-
}, $branches);
17-
18-
return $result;
19-
}
20-
2115
function get_branches() {
2216
$branch_commit_cache_file = get_branch_commit_cache_file_path();
2317
$branch_commit_map = [];
@@ -27,87 +21,45 @@ function get_branches() {
2721

2822
$changed_branches = [];
2923
foreach (BRANCHES as $branch) {
30-
$previous_commit_hash = $branch_commit_map[$branch] ?? null;
31-
$current_commit_hash = trim(shell_exec('git rev-parse origin/' . $branch));
24+
$previous_commit_hash = $branch_commit_map[$branch['ref']] ?? null;
25+
$current_commit_hash = trim(shell_exec('git rev-parse origin/' . $branch['ref']));
3226

3327
if ($previous_commit_hash !== $current_commit_hash) {
3428
$changed_branches[] = $branch;
3529
}
3630

37-
$branch_commit_map[$branch] = $current_commit_hash;
31+
$branch_commit_map[$branch['ref']] = $current_commit_hash;
3832
}
3933

4034
file_put_contents($branch_commit_cache_file, json_encode($branch_commit_map));
4135

42-
return get_branch_matrix($changed_branches);
36+
return $changed_branches;
4337
}
4438

45-
function get_matrix_include(array $branches) {
46-
$jobs = [];
47-
foreach ($branches as $branch) {
48-
$jobs[] = [
49-
'name' => '_ASAN_UBSAN',
50-
'branch' => $branch,
51-
'debug' => true,
52-
'zts' => true,
53-
'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'",
54-
'run_tests_parameters' => '--asan',
55-
'test_function_jit' => false,
56-
];
57-
if ($branch['ref'] !== 'PHP-8.0') {
58-
$jobs[] = [
59-
'name' => '_REPEAT',
60-
'branch' => $branch,
61-
'debug' => true,
62-
'zts' => false,
63-
'run_tests_parameters' => '--repeat 2',
64-
'timeout_minutes' => 360,
65-
'test_function_jit' => true,
66-
];
67-
$jobs[] = [
68-
'name' => '_VARIATION',
69-
'branch' => $branch,
70-
'debug' => true,
71-
'zts' => true,
72-
'configuration_parameters' => "CFLAGS='-DZEND_RC_DEBUG=1 -DPROFITABILITY_CHECKS=0 -DZEND_VERIFY_FUNC_INFO=1'",
73-
'timeout_minutes' => 360,
74-
'test_function_jit' => true,
75-
];
76-
}
77-
}
78-
return $jobs;
79-
}
80-
81-
function get_windows_matrix_include(array $branches) {
82-
$jobs = [];
83-
foreach ($branches as $branch) {
84-
$jobs[] = [
85-
'branch' => $branch,
86-
'x64' => true,
87-
'zts' => true,
88-
'opcache' => true,
89-
];
90-
$jobs[] = [
91-
'branch' => $branch,
92-
'x64' => false,
93-
'zts' => false,
94-
'opcache' => false,
95-
];
96-
}
97-
return $jobs;
39+
function get_current_version(): array {
40+
$file = dirname(__DIR__) . '/main/php_version.h';
41+
$content = file_get_contents($file);
42+
preg_match('(^#define PHP_MAJOR_VERSION (?<num>\d+)$)m', $content, $matches);
43+
$major = (int) $matches['num'];
44+
preg_match('(^#define PHP_MINOR_VERSION (?<num>\d+)$)m', $content, $matches);
45+
$minor = (int) $matches['num'];
46+
return [$major, $minor];
9847
}
9948

10049
$trigger = $argv[1] ?? 'schedule';
10150
$attempt = (int) ($argv[2] ?? 1);
102-
$discard_cache = ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch';
51+
$monday = date('w', time()) === '1';
52+
$discard_cache = $monday
53+
|| ($trigger === 'schedule' && $attempt !== 1)
54+
|| $trigger === 'workflow_dispatch';
10355
if ($discard_cache) {
10456
@unlink(get_branch_commit_cache_file_path());
10557
}
58+
$branch = $argv[3] ?? 'master';
59+
$branches = $branch === 'master'
60+
? get_branches()
61+
: [['ref' => $branch, 'version' => get_current_version()]];
10662

107-
$branches = get_branches();
108-
$matrix_include = get_matrix_include($branches);
109-
$windows_matrix_include = get_windows_matrix_include($branches);
110-
111-
echo '::set-output name=branches::' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n";
112-
echo '::set-output name=matrix-include::' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n";
113-
echo '::set-output name=windows-matrix-include::' . json_encode($windows_matrix_include, JSON_UNESCAPED_SLASHES) . "\n";
63+
$f = fopen(getenv('GITHUB_OUTPUT'), 'a');
64+
fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n");
65+
fclose($f);

0 commit comments

Comments
 (0)