Hi Benjamin, Thanks for the RFC to bring real cases of attribute into the core.
Here are some questions from my side: 1. what's the use case for deprecation against parameters? This feature is really not useful IMO. For example, ` function test2(<<Deprecated>> $value) {}` is not only deprecating the `$value` parameter, it's deprecating the first parameter. So actually it means we are not recommending to call `test2` with any parameter, and it also limits the ability to add more parameters in the future. The real cases I saw is more complex then just deprecate the parameter itself. usually what we deprecated are certain types/values of the parameter, which requires further check. 2. why you propose "for class constants/properties and parameters maybe 8.1" Is there any issue blocking us to get them in 8.0 as well? 3. default message for class functions. ` // Deprecated: Method Foo::test() is deprecated in %s` >From my understanding, the %s here is where this method has been >called/defined, while other message doesn't include this. I think we might >remove it for consistency. 4. message for methods/functions For class property/constant, you clarify when the deprecated message will come up. But for the methods/functions this is missing. I think it would be better if you make it more clear. Thanks, CHU Zhaowei -----Original Message----- From: Benjamin Eberlei <kont...@beberlei.de> Sent: Thursday, May 7, 2020 3:22 PM To: PHP Internals <internals@lists.php.net> Subject: [PHP-DEV] [RFC] <<Deprecated>> Attribute Hi everyone, The attributes RFC specifically looked into the use of attributes at the engine/compiler level. To have a showcase of this with the 8.0 release I want to propose this RFC for a <<Deprecated>> attribute: https://wiki.php.net/rfc/deprecated_attribute <<Deprecated>> is the most obvious engine attribute to add at the beginning in my opinion, as - all other languages with Attributes/Annotations support have it as well - its effects are quite obvious to understand, as such offer a good example and intro to attributes - with potential property/class constant deprecation it adds something that was not possible in userland before. Let me know what you think! greetings Benjamin -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php