Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42141 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44160 invoked from network); 8 Dec 2008 11:10:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2008 11:10:35 -0000 X-Host-Fingerprint: 84.140.190.16 p548CBE10.dip.t-dialin.net Received: from [84.140.190.16] ([84.140.190.16:28034] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/D4-15656-6A00D394 for ; Mon, 08 Dec 2008 06:10:31 -0500 Message-ID: To: internals@lists.php.net Date: Mon, 08 Dec 2008 12:10:27 +0100 User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 84.140.190.16 Subject: Problem with (namespaced) code extending ReflectionProperty - possible bug? From: karsten@typo3.org (Karsten Dambekalns) Hi. Running 5.3.0alpha3 now and converting our codebase to the new namespaces syntax. Works fine so far, the new name resolution rules are very usable and lead to cleaner code so far. :) Now I ran into a problem. We have a class extending ReflectionProperty, and I got a complaint about the signature of our getValue() not matching that of the parent class. Ok, I added that stdclass type hint, fine. I thought. Later on it turned out that I need to make that type hint \stdclass as our code is namespaced and I got an error because My\NS\stdclass could not be found. Now I got that signature mismatch warning again. Bummer. I decided to build a small test case, and now the fun starts. According to the manual and the PHP source the signature is this: public function getValue(stdclass $object) This is my test code: ---- snip ---- ---- snip ---- and the result of running that is: ---- snip ---- Declaration of PropertyReflection::getValue() should be compatible with that of ReflectionProperty::getValue() ---- snip ---- I get that result even when using * no type hint * stdClass The result stays the same when adding a namespace declaration and adjusting the typehint variations accordingly. Can anybody shed some light on this? Or should I file a bug report right away? Thanks, Karsten