Skip to content

Commit

Permalink
Merge tag 'php-8.3.17' into was-8.3.x
Browse files Browse the repository at this point in the history
Tag for php-8.3.17
  • Loading branch information
MaxKellermann committed Feb 14, 2025
2 parents 91f68ac + b4dbf5f commit f30065e
Show file tree
Hide file tree
Showing 83 changed files with 2,700 additions and 1,421 deletions.
8 changes: 5 additions & 3 deletions .github/actions/setup-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ runs:
using: composite
steps:
- name: Setup MySQL
shell: pwsh
shell: cmd
run: |
choco install mysql -y --no-progress --params="/port:3306"
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
mysqld --initialize-insecure
mysqld --install
net start MySQL
mysql --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
- name: Setup MSSQL
shell: pwsh
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/windows/test_task.bat
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ rem generate php.ini
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini
if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini
rem work-around for some spawned PHP processes requiring OpenSSL
rem work-around for some spawned PHP processes requiring OpenSSL and sockets
echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini
echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini

rem remove ext dlls for which tests are not supported
for %%i in (ldap oci8_12c pdo_oci) do (
Expand Down
46 changes: 36 additions & 10 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ on:
windows_version:
required: true
type: string
skip_symfony:
required: true
type: boolean
skip_wordpress:
required: true
type: boolean
permissions:
contents: read
jobs:
Expand Down Expand Up @@ -227,6 +233,8 @@ jobs:
runs-on: ubuntu-latest
container:
image: ubuntu:${{ inputs.ubuntu_version }}
env:
PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb
services:
mysql:
image: mysql:8.3
Expand All @@ -235,6 +243,15 @@ jobs:
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
firebird:
image: jacobalberty/firebird
ports:
- 3050:3050
env:
ISC_PASSWORD: test
FIREBIRD_DATABASE: test.fdb
FIREBIRD_USER: test
FIREBIRD_PASSWORD: test
steps:
- name: git checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -410,7 +427,7 @@ jobs:
-d zend_extension=opcache.so
-d opcache.enable_cli=1
- uses: codecov/codecov-action@v4
if: always()
if: ${{ !cancelled() }}
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -483,7 +500,7 @@ jobs:
echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini
php -v
- name: Test AMPHP
if: always()
if: ${{ !cancelled() }}
run: |
repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server"
X=0
Expand All @@ -501,7 +518,7 @@ jobs:
done
exit $X
- name: Test Laravel
if: always()
if: ${{ !cancelled() }}
run: |
git clone https://github.com/laravel/framework.git --branch=master --depth=1
cd framework
Expand All @@ -514,7 +531,7 @@ jobs:
exit 1
fi
- name: Test ReactPHP
if: always()
if: ${{ !cancelled() }}
run: |
repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream"
X=0
Expand All @@ -532,7 +549,7 @@ jobs:
done
exit $X
- name: Test Revolt PHP
if: always()
if: ${{ !cancelled() }}
run: |
git clone https://github.com/revoltphp/event-loop.git --depth=1
cd event-loop
Expand All @@ -543,7 +560,7 @@ jobs:
exit 1
fi
- name: Test Symfony
if: always()
if: ${{ !cancelled() && !inputs.skip_symfony }}
run: |
git clone https://github.com/symfony/symfony.git --depth=1
cd symfony
Expand All @@ -564,7 +581,7 @@ jobs:
done
exit $X
- name: Test PHPUnit
if: always()
if: ${{ !cancelled() }}
run: |
git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
cd phpunit
Expand All @@ -575,15 +592,15 @@ jobs:
exit 1
fi
- name: 'Symfony Preloading'
if: always()
if: ${{ !cancelled() && !inputs.skip_symfony }}
run: |
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
cd symfony_demo
git rev-parse HEAD
sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php
- name: Test Wordpress
if: always()
if: ${{ !cancelled() && !inputs.skip_wordpress }}
run: |
git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1
cd wordpress
Expand Down Expand Up @@ -952,10 +969,18 @@ jobs:
- x64: true
zts: true
opcache: true
asan: false
- x64: false
zts: false
opcache: false
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
asan: false
- x64: true
zts: true
opcache: true
asan: true
branch: 'master'
timeout: 120
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
runs-on: windows-${{ inputs.windows_version }}
env:
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
Expand All @@ -968,6 +993,7 @@ jobs:
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
PARALLEL: -j2
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
ASAN: "${{ matrix.asan && '1' || '0' }}"
steps:
- name: git config
run: git config --global core.autocrlf false && git config --global core.eol lf
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ jobs:
|| ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04')
|| '20.04' }}
windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
secrets: inherit
78 changes: 77 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,82 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 Jan 2025, PHP 8.3.16
13 Feb 2025, PHP 8.3.17

- Core:
. Fixed bug GH-16892 (ini_parse_quantity() fails to parse inputs starting
with 0x0b). (nielsdos)
. Fixed bug GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0).
(nielsdos)
. Fixed bug GH-17214 (Relax final+private warning for trait methods with
inherited final). (ilutov)
. Fixed NULL arithmetic during system program execution on Windows. (cmb,
nielsdos)
. Fixed potential OOB when checking for trailing spaces on Windows. (cmb)
. Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c).
(nielsdos, ilutov)
. Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos)
. Fix NULL arithmetic in System V shared memory emulation for Windows. (cmb)

- DOM:
. Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype).
(nielsdos)

- Enchant:
. Fix crashes in enchant when passing null bytes. (nielsdos)

- FTP:
. Fixed bug GH-16800 (ftp functions can abort with EINTR). (nielsdos)

- GD:
. Fixed bug GH-17349 (Tiled truecolor filling looses single color
transparency). (cmb)
. Fixed bug GH-17373 (imagefttext() ignores clipping rect for palette
images). (cmb)
. Ported fix for libgd 223 (gdImageRotateGeneric() does not properly
interpolate). (cmb)

- Intl:
. Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos)
. Fixed bug GH-17469 (UConverter::transcode always emit E_WARNING on
invalid encoding). (David Carlier)

- Opcache:
. Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos)
. Fixed bug GH-17564 (Potential UB when reading from / writing to struct
padding). (ilutov)

- PDO:
. Fixed a memory leak when the GC is used to free a PDOStatment. (Girgias)
. Fixed a crash in the PDO Firebird Statement destructor. (nielsdos)
. Fixed UAFs when changing default fetch class ctor args. (Girgias, nielsdos)

- Phar:
. Fixed bug GH-17518 (offset overflow phar extractTo()). (nielsdos)

- PHPDBG:
. Fix crashes in function registration + test. (nielsdos, Girgias)

- Session:
. Fix type confusion with session SID constant. (nielsdos)
. Fixed bug GH-17541 (ext/session NULL pointer dereferencement during
ID reset). (Girgias)

- SimpleXML:
. Fixed bug GH-17409 (Assertion failure Zend/zend_hash.c:1730). (nielsdos)

- SNMP:
. Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session).
(David Carlier)

- SPL:
. Fixed bug GH-17463 (crash on SplTempFileObject::ftruncate with negative
value). (David Carlier)

- Zip:
. Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry).
(nielsdos)

02 Jan 2025, PHP 8.3.16RC1

- Core:
. Fixed bug GH-17106 (ZEND_MATCH_ERROR misoptimization). (ilutov)
Expand Down
38 changes: 21 additions & 17 deletions TSRM/tsrm_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,16 @@ static process_pair *process_get(FILE *stream)
process_pair *ptr;
process_pair *newptr;

for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
if (ptr->stream == stream) {
break;
if (TWG(process) != NULL) {
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
if (ptr->stream == stream) {
break;
}
}
}

if (ptr < (TWG(process) + TWG(process_size))) {
return ptr;
if (ptr < (TWG(process) + TWG(process_size))) {
return ptr;
}
}

newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
Expand All @@ -400,19 +402,21 @@ static shm_pair *shm_get(key_t key, void *addr)
shm_pair *ptr;
shm_pair *newptr;

for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
if (!ptr->descriptor) {
continue;
}
if (!addr && ptr->descriptor->shm_perm.key == key) {
break;
} else if (ptr->addr == addr) {
break;
if (TWG(shm) != NULL) {
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
if (!ptr->descriptor) {
continue;
}
if (!addr && ptr->descriptor->shm_perm.key == key) {
break;
} else if (ptr->addr == addr) {
break;
}
}
}

if (ptr < (TWG(shm) + TWG(shm_size))) {
return ptr;
if (ptr < (TWG(shm) + TWG(shm_size))) {
return ptr;
}
}

newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
Expand Down
26 changes: 26 additions & 0 deletions Zend/tests/gh17214.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--TEST--
GH-17214: Relax final+private warning for trait methods with inherited final
--FILE--
<?php

trait MyTrait
{
final protected function someMethod(): void {}
}

class Test
{
use MyTrait {
someMethod as private anotherMethod;
}

public function __construct()
{
$this->anotherMethod();
}
}

?>
===DONE===
--EXPECT--
===DONE===
2 changes: 0 additions & 2 deletions Zend/tests/traits/gh12854.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ foreach (['pub', 'prot', 'priv', 'final1', 'final2', 'final3'] as $method) {

?>
--EXPECTF--
Warning: Private methods cannot be final as they are never overridden by other classes in %s on line %d

Warning: Private methods cannot be final as they are never overridden by other classes in %s on line %d
--- Method: pub ---
bool(true)
Expand Down
41 changes: 41 additions & 0 deletions Zend/tests/zend_ini/gh16886.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--TEST--
GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0)
--FILE--
<?php
echo ini_parse_quantity('0x 0'), "\n";
echo ini_parse_quantity('0x+0'), "\n";
echo ini_parse_quantity('0x-0'), "\n";
echo ini_parse_quantity('0b 0'), "\n";
echo ini_parse_quantity('0b+0'), "\n";
echo ini_parse_quantity('0b-0'), "\n";
echo ini_parse_quantity('0o 0'), "\n";
echo ini_parse_quantity('0o+0'), "\n";
echo ini_parse_quantity('0o-0'), "\n";
?>
--EXPECTF--
Warning: Invalid quantity "0x 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0x+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0x-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0b 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0b+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0b-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0o 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0o+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0o-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0
Loading

0 comments on commit f30065e

Please sign in to comment.