Re: [RFC] [VOTE] PHP Attributes

From: Date: Thu, 12 May 2016 14:53:55 +0000
Subject: Re: [RFC] [VOTE] PHP Attributes
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-93279@lists.php.net to get a copy of this message
On 12 May 2016 at 16:29, Benjamin Eberlei <kontakt@beberlei.de> wrote: > On Tue, May 10, 2016 at 8:29 PM, Dmitry Stogov <dmitry@zend.com> wrote: > > > Hi internals, > > > > > > I've started voting on "PHP Attributes" RFC. > > > > > > https://wiki.php.net/rfc/attributes > > > > > > In my opinion, "PHP Attributes" might be a smart tool for PHP extension, > > but it's not going to be the end of the world, if we decided to live with > > doc-comments only. > > > > > > Thanks. Dmitry. > > > > I voted -1 > > Reasons: from a Doctrine Annotations maintainer perspective, either getting > a list (without keys) of strings back or ast\nodes are not enough or way > too advanced for our use-case. The middle ground is missing where a > <php-constant> (Name borrowed from the RFC) can be an arbitrarily deep > nested array, that means getAttributes() does should not only return > "string" or ast\node as result for each attribute, to there should be a way > to get arrays back. > > Example: > > > https://gist.github.com/beberlei/18db9f7d5f6157b817348a58fa2aee25 > > greetings > Benjamin > Urgh, that is indeed quirky, and makes it unusable. Is that an implementation or a spec issue? I know PHP 5.6+ allows array constants, but I am not aware of whether that is in the specification. Indeed, show-stopper here. I'll have to vote "-1" for now, and wait for a version that either explicitly contains any constant expression or just supports arrays as constants. I'll also need to compile the branch and try it out myself before voting further: my bad for being hasty. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#93279) next »