On 15/11/2021 18:27, Arvids Godjuks wrote:
If a 3rd party package combines fixing major bugs with a release of a
significant version and including also the new attribute that's available
only on newer PHP version?


Just to be clear, attributes are designed in such a way that you, and third-party packages, can add this attribute *right now*, in your PHP 7.4 code, with no ill effects. In older versions, it's a comment (as long as it's on its own line); and in 8.0 and 8.1 it will be parsed as an attribute, but simply do nothing.

You can add the attribute to every single class, and slowly remove it when you're confident of each class not needing it; or you can collect the E_DEPRECATED messages and add the attribute to every class mentioned. Even in PHP 9.0, there will be no subtle behaviour differences; the code will either run, or you will get an error in exactly the same circumstances as the E_DEPRECATED messages.

Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to