Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109966 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33197 invoked from network); 2 May 2020 17:27:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 May 2020 17:27:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5365A1804CE for ; Sat, 2 May 2020 09:01:56 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 2 May 2020 09:01:55 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id u15so5421551ljd.3 for ; Sat, 02 May 2020 09:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1z1sKnZ8sefP7ygfnUs3xjHWjvNFUoBcpCMvsyfuL0g=; b=RhnBSZTMIt+xsCh9fmD1+HJqlcrLNz42/dapsQ1/+5rCGqKZUOKWl6TKWA6y9f55J5 w5bCq1vQWkL4CPIaaa5dWbpbmD0H9HQy7s5FOClePJh10ebWvFrEoBQLRgYrtvBfLPOC Q0nQgTxsVL+h4324xzeIGmP1G/pBwRxmcL3UoHL6XNtaDBNqfRE5qYJcWuFYXwAxiq+g nRVzI0QZegOWOAojNuLKCp3L/tNju3ag1Hyo63qhR8HcJV33R7woIps5GgoFMmpMdhxm ONdzPfdDMGQAvR1SqCNWi7Ni+Eo1pRPUNEIeNJBCm3fZ1Q8avAeHc2VJzFNvzzyhehdu Mfwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1z1sKnZ8sefP7ygfnUs3xjHWjvNFUoBcpCMvsyfuL0g=; b=CqE+0H8Fd32r9snuAZXYIV1KMmdlzS4l1W8zCKuONzO7ZmsuLq351Zc31aMzKiwZea SqTIgzItAF8BcSXnktF056QS1tNo0ZKakGv7dbD8d6I3mhgmDH9JkVxxpk6BxG5fnr7U tgnSeWZG3q4grtBo7Fw2o+vVrmwxm23txQjmm7qHvA/EPWznA8+L5higTqO4cSjwm2OF ALG0PvvOIyJ9jhJYAVk6QjOhOOgd54S0TwciC81/sFtnfZYOkTEWGUTSGiQ09QheR8NS fL+dcAtonezrN5i0MrsCA/JaS7sp4OGogFNym1ISwqcu026O7Ye4YwrYM6uDk87opRrW 2/3A== X-Gm-Message-State: AGi0PubLiw+5NCjIxUnYES0ykil8WvrYV6GwEK6VLb4OfDjxNKWDA7G3 s8LFRDb30cR0FeIZqv2IhcoQaZ8Viq7gndWeLZ0= X-Google-Smtp-Source: APiQypL89PMzK/TvX+gTlWGuxkgorLq6TdmPyai/tYVWUhLGDZJ4svDWqdb2aMHS2SGnMbmuQu2Gl+UucMku/TNp2lw= X-Received: by 2002:a2e:85da:: with SMTP id h26mr5370704ljj.260.1588435313559; Sat, 02 May 2020 09:01:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 2 May 2020 18:01:36 +0200 Message-ID: To: Niklas Keller Cc: Benas IML , PHP Internals Content-Type: multipart/alternative; boundary="0000000000009d0b5005a4ac6a17" Subject: Re: [PHP-DEV] Renaming PhpAttribute to Attribute From: nikita.ppv@gmail.com (Nikita Popov) --0000000000009d0b5005a4ac6a17 Content-Type: text/plain; charset="UTF-8" On Sat, May 2, 2020 at 5:57 PM Niklas Keller wrote: > Hey Benas, > > a question has come up whether we even need the PhpAttribute / > Attribute attribute at all. We could prevent any conflict if we just > delete it. > > Best, > Niklas > We need Attribute so static analysis tooling and IDEs can check whether a class is intended to be used as an attribute. I believe there are also plans to extend this functionality to allow specifying more constraints, such as which elements the attribute may target and whether it can appear multiple times. All of these things can be implemented in code, but having them encoded as (attribute) metadata makes the information accessible to introspection and tooling. Nikita > Am Di., 28. Apr. 2020 um 17:37 Uhr schrieb Benas IML > : > > > > Hey internals, > > > > Since it's safe to say that the Attributes v2 RFC has passed, I wanted to > > make a separate thread based on the comment by Rowan Tommins in the PHP > > namespace policy thread. This is a quote from his comment: > > > > > One prefix doesn't make a trend. "PhpToken" is a different case - it's > a > > > token of PHP source code, so the prefix isn't anything to do with > > > avoiding name collisions, it's a natural clarification. > > > > > > To be honest, I'd be perfectly happy with the attributes RFC using the > > > class name "Attribute", just as we use "Iterator", "Closure", > > > "Exception", etc, etc. At which point the whole thing's a non-issue. > > > > I do strongly agree with him and I believe we should rename > `\PhpAttribute` > > to simply `\Attribute` before the PHP 8 release in order to improve > > consistency with other classes and interfaces e. g. Iterator, > ArrayAccess, > > Countable. It would also make the attribute class definition look more > > aesthetically pleasing: > > > > ``` > > > <> > > class Test {} > > ``` > > > > I am ready to make an RFC for this if the replies are mostly positive, so > > please, express your opinions! > > > > Best regards, > > Benas Seliuginas > > P.S: this is my second email account so hopefully it won't get marked as > > spam. > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --0000000000009d0b5005a4ac6a17--