[php-src] Issue #18945: PHP 8.4 breaks php-screw
| From: | zboszor | Date: | Thu, 26 Jun 2025 05:37:03 +0000 |
| Subject: | [php-src] Issue #18945: PHP 8.4 breaks php-screw | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250325@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/18945
Author: zboszor
### Description
There is no simple reproducer yet.
With a quite complex codebase using Laravel 12 and with mixed encrypted and non-encrypted scripts,
PHP 8.4 throws various errors, like:
```
Jun 23 23:45:41 dtd php[992]: PHP Fatal error: Uncaught RuntimeException: A facade root has not
been set. in /www/pages/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:358
Jun 23 23:45:41 dtd php[992]: Stack trace:
Jun 23 23:45:41 dtd php[992]: #0
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php(17):
Illuminate\Support\Facades\Facade::__callStatic()
Jun 23 23:45:41 dtd php[992]: #1
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(918):
Illuminate\Foundation\Exceptions\RegisterErrorViewPaths->__invoke()
Jun 23 23:45:41 dtd php[992]: #2
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(893):
Illuminate\Foundation\Exceptions\Handler->registerErrorViewPaths()
Jun 23 23:45:41 dtd php[992]: #3
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(818):
Illuminate\Foundation\Exceptions\Handler->renderHttpException()
Jun 23 23:45:41 dtd php[992]: #4
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(709):
Illuminate\Foundation\Exceptions\Handler->prepareResponse()
Jun 23 23:45:41 dtd php[992]: #5
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(597):
Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse()
Jun 23 23:45:41 dtd php[992]: #6 /www/pages/app/Exceptions/Handler.php(61):
Illuminate\Foundation\Exceptions\Handler->render()
Jun 23 23:45:41 dtd php[992]: #7
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(574):
App\Exceptions\Handler->render()
Jun 23 23:45:41 dtd php[992]: #8
/www/pages/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(148):
Illuminate\Foundation\Http\Kernel->renderException()
Jun 23 23:45:41 dtd php[992]: #9 /www/pages/public/index.php(52):
Illuminate\Foundation\Http\Kernel->handle()
Jun 23 23:45:41 dtd php[992]: #10 {main}
Jun 23 23:45:41 dtd php[992]: thrown in
/www/pages/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 358
```
and
```
[root@dtd ~]# cd /www/pages/
[root@dtd pages]# php artisan
In LoadConfiguration.php line 99:
array_merge(): Argument #2 must be of type array, int given
```
The second error is what #18943 was about.
Said Laravel 12 using codebase works properly in these situations:
- PHP 8.3 + PHP-screw + the usual mix of encrypted and non-encrypted scripts
- PHP 8.4 + PHP-screw + no encrypted files
With simple examples, PHP-screw (a PHP Encoder / Decoder) works properly with PHP 8.4.
FWIW, the PHP-screw version tested is with my additions at https://github.com/zboszor/php-screw , using either
the last 1.9 release or from https://github.com/zboszor/php-screw/pull/2
The [migration manual from 8.3 to 8.4](https://www.php.net/manual/en/migration84.php) does not say a
word about internal engine changes that would be related to this. Previously, the modified C API or
a (slightly) different behaviour was always mentioned somewhere, even if in small print.
### PHP Version
```plain
[root@dtd ~]# php -v
PHP 8.4.8 (cli) (built: Jun 3 2025 16:29:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.8, Copyright (c) Zend Technologies
with php_screw v2.0.0, (C) 2020-2025 Zoltán Böszörményi <zboszor@gmail.com>, by
Kunimasa Noda and Zoltán Böszörményi
with Zend OPcache v8.4.8, Copyright (c), by Zend Technologies
[root@dtd ~]# php-fpm -v
PHP 8.4.8 (fpm-fcgi) (built: Jun 3 2025 16:29:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.8, Copyright (c) Zend Technologies
with php_screw v2.0.0, (C) 2020-2025 Zoltán Böszörményi <zboszor@gmail.com>, by
Kunimasa Noda and Zoltán Böszörményi
with Zend OPcache v8.4.8, Copyright (c), by Zend Technologies
```
### Operating System
_No response_