Re: [RFC] PHP Attributes

From: Date: Mon, 25 Apr 2016 19:24:17 +0000
Subject: Re: [RFC] PHP Attributes
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-92752@lists.php.net to get a copy of this message
Check here to see what we did for php-annotations: https://github.com/php-annotations/php-annotations/blob/master/docs/CustomAnnotations.rst#usageannotation It's somewhat similar to how C# does it, and it has worked quite nicely. On Mon, Apr 25, 2016 at 8:40 PM, Stanislav Malyshev <smalyshev@gmail.com> wrote: > Hi! > > > a class/property/method that has annotations, it NOT inherit > > annotations/attributes by default. However, by adding an annotation of > > > > <<__inherit>> > > > > (Or some other internal-reserved keyword, I don't have strong feelings > > on what it is) then the engine will automatically give you all the > > annotations off of the parent, and union them with whatever additional > > ones you add. > > Then it makes no sense to ban repeating annotations - because that's > what we effectively are doing here. Also, this assumes all annotations > are either of inheritable kind or not, and these two categories can > never be combined. > > -- > Stas Malyshev > smalyshev@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#92752) next »