Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41652 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63306 invoked from network); 4 Nov 2008 17:36:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2008 17:36:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=et@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=et@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 62.75.137.136 as permitted sender) X-PHP-List-Original-Sender: et@php.net X-Host-Fingerprint: 62.75.137.136 static-ip-62-75-137-136.inaddr.intergenia.de Linux 2.5 (sometimes 2.4) (4) Received: from [62.75.137.136] ([62.75.137.136:59981] helo=eve.fuer-et.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/6A-15458-A3880194 for ; Tue, 04 Nov 2008 12:36:59 -0500 Received: from lapalma.mis.informatik.tu-darmstadt.de (lapalma.mis.informatik.tu-darmstadt.de [130.83.165.195]) by eve.fuer-et.de (Postfix) with ESMTP id 889CE367AC4E for ; Tue, 4 Nov 2008 18:36:55 +0100 (CET) To: internals@lists.php.net Date: Tue, 4 Nov 2008 18:36:54 +0100 User-Agent: KMail/1.9.7 References: <49048EC1.9060908@chiaraquartet.net> <200811041819.25933.et@php.net> <033501c93ea2$ab332690$3ffc1f3e@foxbox> In-Reply-To: <033501c93ea2$ab332690$3ffc1f3e@foxbox> X-PGP-Key-URL: http://www.mis.informatik.tu-darmstadt.de/People/walk/ MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200811041836.54963.et@php.net> Subject: Re: [PHP-DEV] namespace separator and whining From: et@php.net (Stefan Walk) On Tuesday 04 November 2008 18:27:43 Steph Fox wrote: > Hi Stefan, > > > Dev writes a script, uses autoload, overrides global class. > > Distributed to user, that has ns.lookup=On as you propose, user borks his > > install, lacks the file containing the class, gets the global class -> > > obscure error messages because of nonexisting methods in places unrelated > > to > > the place where the actual error happened. Not really a good idea, IMO. > > This is what happens now, right. So what's different? With the proposed change -- failing at "step 3", it doesn't. It fails at the time that you try to create the instance, saying the class was not found, which is actually the case. > > > Failing there is the best option. It's not like you have to prefix every > > single occurence, you just have to say at the top of the file "When I say > > Exception, I mean \Exception". > > The point is that your dev would have done exactly that, so whether your > user has the setting on or off is immaterial. > > - Steph No, the dev didn't mean \Exception, he meant *his* exception, the one that he has in the current namespace, and any way your setting would not have resulted in any error, because for the dev, autoload worked. Regards, Stefan