-
-
Notifications
You must be signed in to change notification settings - Fork 150
Description
The PHP 8.4 polyfills have a minimum supported PHP version of PHP 7.2.
In the polyfill code for the Deprecated attribute uses readonly properties, which are only available in PHP 8.1+:
https://github.com/symfony/polyfill-php84/blob/1.x/Resources/stubs/Deprecated.php
I might be missing something, but I have a feeling that this means that using the (polyfilled) #[Deprecated] attribute in code which also needs to run on PHP 8.0 will lead to a parse error when the class is loaded via the Composer classmap: https://3v4l.org/f9oRo
I don't think the class using readonly and typed properties is a problem on PHP 7.2-7.4 as attributes are not supported, so the class will never be loaded anyway (unless manually requested, in which case I'd call that user-error).