Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64612 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68751 invoked from network); 6 Jan 2013 22:36:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2013 22:36:07 -0000 Authentication-Results: pb1.pair.com header.from=g.b.yahav@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=g.b.yahav@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.169 as permitted sender) X-PHP-List-Original-Sender: g.b.yahav@gmail.com X-Host-Fingerprint: 209.85.214.169 mail-ob0-f169.google.com Received: from [209.85.214.169] ([209.85.214.169:65082] helo=mail-ob0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/59-04877-55CF9E05 for ; Sun, 06 Jan 2013 17:36:06 -0500 Received: by mail-ob0-f169.google.com with SMTP id v19so16845519obq.0 for ; Sun, 06 Jan 2013 14:36:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=vUIhh8LvzwrE9CjuZ/Oo6fjvwJyMSap88JR3kKnR8m8=; b=WUpFjnndHQHrG6jyniT96MApMajvU/sAxgBP2TuH66aH36piNq7Gav6+RhplnGd5Vh W85mjWFpglYBnXkF6tJ4GdrwOO3WK/YIpwnpmnI286O6fK4Onn+hpjYF/adYRCNZCe9a EkfXWYhYtvhSFd8mgq4gw2wDI5U4f7QsRoM7f1PPvcrS/9O9AuCE8TKr9qnr3sNPr6Ec zUfRz0kHTtAKhEF5vJN2xl/YnCRHIZ+cT6ybjzVu0y8/9RMdA5UWgPTfx+bjnvQeBFKr fEwv9xqQ6H+/pMxX34qXSlyV3GhB51lbBxaelEJa+wwdLRqVVD19hMTLdTlLsa2I5VTq sZCg== Received: by 10.60.169.18 with SMTP id aa18mr33639211oec.13.1357511763413; Sun, 06 Jan 2013 14:36:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.151.4 with HTTP; Sun, 6 Jan 2013 14:35:43 -0800 (PST) In-Reply-To: <45FD2112-5469-48A2-8941-92415EC711E1@strojny.net> References: <45FD2112-5469-48A2-8941-92415EC711E1@strojny.net> Date: Mon, 7 Jan 2013 00:35:43 +0200 Message-ID: To: Lars Strojny Cc: PHP internals Content-Type: multipart/alternative; boundary=bcaec54b4a566fcca604d2a656fd Subject: Re: [PHP-DEV] [RFC] Reflection annotations reader From: g.b.yahav@gmail.com (Yahav Gindi Bar) --bcaec54b4a566fcca604d2a656fd Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Mon, Jan 7, 2013 at 12:24 AM, Lars Strojny wrote: > Hi Yahav, > > Am 06.01.2013 um 22:58 schrieb Yahav Gindi Bar : > [...] > > In one of the discussions (about the "deprecated" keyword, to be > specific), > > it was been said that adding ability to read doc-comment annotation cou= ld > > be handy. Personally, I really think it can be great. > > > > So, I've created an RFC that propose to improve the Reflection extensio= n > by > > adding the ability to read annotations decorated in the doc-comment. > > > > https://wiki.php.net/rfc/reflection_doccomment_annotations > > > > What is your opinion about this? > > Hi! I do agree with you two about the difference between my proposal and the way that Doctorine and other FW implemented that, and as I've told - its a first draft of the proposal - the main idea is to get the ability to have static metadata. I'll implement the actual patch after we'll agree on the way it should work :). About Doctorine implementation, firstly - the parser code is... hugh, I really think that we should do something about that! However, I don't think that we should make, like their implementation - ability to create constructors and such, otherwise, it'll look just like Attributes... I think that our work is to isolate each annotation so it'll be easy to access, then, it'll be easy enough to write the code that creates "complex annotations", such as constructors and so on, in userland. > From what I've seen in various components using annotations, this kind of > support wouldn=92t be enough. I would much prefer direct mapping of a sin= gle > annotation on a class including a way to define properties and such. This > is how e.g. Doctrine, Symfony, Zend Framework etc. all utilize annotation= s > nowadays. > > Can you provide an example? > cu, > Lars --bcaec54b4a566fcca604d2a656fd--