You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #359 [PHP80] Prevent redefinition of PHP 8.0 classes (Firtzberg)
This PR was merged into the 1.23-dev branch.
Discussion
----------
[PHP80] Prevent redefinition of PHP 8.0 classes
Not redeclaring polyfilled classes when PHP version is 8.0 or above.
The same approach is used for the Stringable interface in [this commit](symfony/polyfill@8a3e849).
One of my scripts runs [`opcache_compile_file`](https://www.php.net/manual/en/function.opcache-compile-file.php) on vendor files, including symfony. I'm in the process of upgrading to PHP 8. Running `opcache_compile_file` on either of the modified files causes a fatal error `Fatal error: Cannot declare class ValueError/UnhandledMatchError, because the name is already in use`.
That's not the case on PHP versions below 8.
Commits
-------
f1854da Not redeclaring polyfilled classes when PHP version is target or above
0 commit comments