[php-src] Issue #8219: Stream Wrapper + Stream Filter cannot longer alter PHP file since PHP 7.4
| From: | lyrixx | Date: | Fri, 18 Mar 2022 14:18:34 +0000 |
| Subject: | [php-src] Issue #8219: Stream Wrapper + Stream Filter cannot longer alter PHP file since PHP 7.4 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240415@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8219
Author: lyrixx
### Description
I created a minimal gist to reproduce the error since it need at least 3 files.
https://gist.github.com/lyrixx/13df9efcfd08fee999c6b2bac0106117
```
>…re/dev/labs/php/rename-legacy-function(main *) php7.2 index.php
/home/gregoire/dev/labs/php/rename-legacy-function/test1.php
/home/gregoire/dev/labs/php/rename-legacy-function/test2.php
>…re/dev/labs/php/rename-legacy-function(main *) php7.3 index.php
/home/gregoire/dev/labs/php/rename-legacy-function/test1.php
/home/gregoire/dev/labs/php/rename-legacy-function/test2.php
>…re/dev/labs/php/rename-legacy-function(main *) php7.4 index.php
PHP Parse error: syntax error, unexpected end of file, expecting ';' in
/home/gregoire/dev/labs/php/rename-legacy-function/test1.php on line 8
Parse error: syntax error, unexpected end of file, expecting ';' in
/home/gregoire/dev/labs/php/rename-legacy-function/test1.php on line 8
```
---
The idea is to rename some functions (for dealing with a legacy and dirty codebase) with a stream
filter. It used to work with older PHP version, but it seems it's broken since PHP 7.4.
### PHP Version
7.4
### Operating System
Ubuntu 20.04