Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110092 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38965 invoked from network); 8 May 2020 21:19:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 May 2020 21:19:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5530E1804D3 for ; Fri, 8 May 2020 12:55:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,FROM_EXCESS_BASE64, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS16509 54.254.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from smtpbgsg2.qq.com (smtpbgsg2.qq.com [54.254.200.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 8 May 2020 12:55:09 -0700 (PDT) X-QQ-mid:Yeas3t1588967701t414t09010 Received: from 4B562073492C4058817F84E016DE3445 (me@jhdxr.com [116.14.113.108]) X-QQ-SSF:00100000000000F0FG1000000000000 To: "'Benjamin Eberlei'" , "'PHP Internals'" References: In-Reply-To: Date: Sat, 9 May 2020 03:54:59 +0800 Message-ID: <004a01d62572$8eaf9760$ac0ec620$@jhdxr.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: zh-cn Thread-Index: AQLLSAlF6yrq4ak0jwlswwBSxLES/6a0UEvQ X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:jhdxr.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 Subject: RE: [PHP-DEV] [RFC] <> Attribute From: me@jhdxr.com (=?utf-8?b?Q0hVIFpoYW93ZWk=?=) Hi Benjamin, Thanks for the RFC to bring real cases of attribute into the core.=20 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(<> $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.=20 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 =20 Sent: Thursday, May 7, 2020 3:22 PM To: PHP Internals Subject: [PHP-DEV] [RFC] <> 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 <> attribute: https://wiki.php.net/rfc/deprecated_attribute <> 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