Re: Renaming PhpAttribute to Attribute

From: Date: Sat, 02 May 2020 15:56:21 +0000
Subject: Re: Renaming PhpAttribute to Attribute
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-109965@lists.php.net to get a copy of this message
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 Am Di., 28. Apr. 2020 um 17:37 Uhr schrieb Benas IML <benas.molis.iml@gmail.com>: > > 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: > > ``` > <?php > <<Attribute>> > 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 >

« previous php.internals (#109965) next »