Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54227 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76936 invoked from network); 28 Jul 2011 09:55:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2011 09:55:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=frederic.hardy@mageekbox.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=frederic.hardy@mageekbox.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mageekbox.net from 217.70.183.195 cause and error) X-PHP-List-Original-Sender: frederic.hardy@mageekbox.net X-Host-Fingerprint: 217.70.183.195 relay3-d.mail.gandi.net Linux 2.6 Received: from [217.70.183.195] ([217.70.183.195:37937] helo=relay3-d.mail.gandi.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/C4-50004-222313E4 for ; Thu, 28 Jul 2011 05:55:46 -0400 X-Originating-IP: 217.70.178.134 Received: from mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.134]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 98DEAA808A for ; Thu, 28 Jul 2011 11:55:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter4-d.gandi.net (mfilter4-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id zVnJ3vzo86+d for ; Thu, 28 Jul 2011 11:55:42 +0200 (CEST) X-Originating-IP: 92.103.14.114 Received: from [10.0.1.60] (unknown [92.103.14.114]) (Authenticated sender: frederic.hardy@mageekbox.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPA id 27D06A8070 for ; Thu, 28 Jul 2011 11:55:41 +0200 (CEST) Message-ID: <4E31328C.9030208@mageekbox.net> Date: Thu, 28 Jul 2011 11:57:32 +0200 Reply-To: frederic.hardy@mageekbox.net User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Exception throwed if parent::__construct() not called in \DirectoryIterator subclass From: frederic.hardy@mageekbox.net (=?ISO-8859-1?Q?Fr=E9d=E9ric_Hardy?=) Hello ! In PHP 5.4 alpha, an exception is throwing if a subclass of=20 \DirectoryIterator not called the parent constructor. Moreover, this exception can not be catched in the constructor of the=20 subclass. This behavious seems to be a good idea, because \DirectoryIterator may=20 be in an inconsistant state if the parent constructor is not called. But i think that it's not a good idea, because it's a BC break. It's not the case in 5.3 and i have unit test cases which fail by this=20 new behavior, because moked \DirectoryIterator class does not call the=20 parent constructor. In context of unit test, the fact that \DirectoryIterator is=20 inconsistant may be not a problem and can be the desired behavior. There is a bug report : https://bugs.php.net/bug.php?id=3D55300 Best regards, Fred --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Fr=E9d=E9ric Hardy : Architecte d'application/Admin. syst=E8me/Ergonome CV : http://blog.mageekbox.net/public/cv.frederic.hardy.pdf Blog : http://blog.mageekbox.net Twitter : http://twitter.com/mageekguy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D