Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50366 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53732 invoked from network); 18 Nov 2010 18:01:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2010 18:01:22 -0000 Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 85.88.12.247 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 85.88.12.247 toolslave.net Received: from [85.88.12.247] ([85.88.12.247:43473] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/50-01108-5E965EC4 for ; Thu, 18 Nov 2010 13:01:13 -0500 Received: from soft83.vub.ac.be ([134.184.43.183]) by uhweb12247.united-hoster.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PJ8n3-0006D0-65; Thu, 18 Nov 2010 19:01:00 +0100 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Thu, 18 Nov 2010 19:00:51 +0100 Cc: PHP Development Content-Transfer-Encoding: quoted-printable Message-ID: <89F665AA-1F23-41D1-B1D8-F9C078637A2E@stefan-marr.de> References: To: Patrick ALLAERT X-Mailer: Apple Mail (2.1081) Subject: Re: [PHP-DEV] Trait behavior when providing a new name while no conflict exists From: php@stefan-marr.de (Stefan Marr) Hi Patrick: On 18 Nov 2010, at 16:01, Patrick ALLAERT wrote: > Hi, >=20 > Is this intended not being able to give a new name to a method even in > case of no conflict? > In the following example, I try to provide the name "sayIt" > additionally to "saySomething" from trait "Hello": >=20 > trait Hello { > public function saySomething() { > echo 'Hello'; > } > } >=20 > class MyHello{ > use Hello { > Hello::saySomething as sayIt; > } > } > ?> Thanks for catching this, it is a bug. It works without the Hello:: part and it should also work with the = Hello::. Fixed with the following commit: = http://svn.php.net/viewvc?view=3Drevision&revision=3D305512 Best regards Stefan --=20 Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525