Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75059 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33080 invoked from network); 24 Jun 2014 11:42:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jun 2014 11:42:21 -0000 Authentication-Results: pb1.pair.com header.from=remi@fedoraproject.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=remi@fedoraproject.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fedoraproject.org from 217.70.183.195 cause and error) X-PHP-List-Original-Sender: remi@fedoraproject.org X-Host-Fingerprint: 217.70.183.195 relay3-d.mail.gandi.net Received: from [217.70.183.195] ([217.70.183.195:51520] helo=relay3-d.mail.gandi.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/10-32023-B1469A35 for ; Tue, 24 Jun 2014 07:42:20 -0400 Received: from mfilter2-d.gandi.net (mfilter2-d.gandi.net [217.70.178.140]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 4F21BA80C2 for ; Tue, 24 Jun 2014 13:42:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter2-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter2-d.gandi.net (mfilter2-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id HTHV+8un7DVt for ; Tue, 24 Jun 2014 13:42:15 +0200 (CEST) X-Originating-IP: 82.241.130.121 Received: from schrodingerscat.famillecollet.com (pom51-2-82-241-130-121.fbx.proxad.net [82.241.130.121]) (Authenticated sender: contact@ll-experts.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 89F16A80B8 for ; Tue, 24 Jun 2014 13:42:15 +0200 (CEST) Message-ID: <53A96417.6070203@fedoraproject.org> Date: Tue, 24 Jun 2014 13:42:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: PHP Internals References: <53A1C722.9060501@fedoraproject.org> <53A21137.6010705@sugarcrm.com> <53A2A9BD.1070603@sugarcrm.com> <53A3874E.20704@sugarcrm.com> <53A65578.6000701@sugarcrm.com> <53A8626B.701@fedoraproject.org> <53A866B6.4060501@sugarcrm.com> <53A92B24.40706@fedoraproject.org> <53A92F93.2060507@sugarcrm.com> In-Reply-To: <53A92F93.2060507@sugarcrm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: Bug 67072 resolution for 5.4/5.5 From: remi@fedoraproject.org (Remi Collet) Le 24/06/2014 09:58, Stas Malyshev a =C3=A9crit : > I understand that this creates a need that we do not cover of how to > mock such objects, and I welcome suggestions - including how to make > newInstanceArgWithoutConstructor safe. But currently I do not see how w= e > can leave the unserialize hack in for classes like SplFileObject - > unless somebody points me to a way to make it safe. Proposal, hawfull hack attached. Obviously, this doesn't make newInstanceWithoutConstructor safe ;) But this answer the need. And we can state in documentation. "force : allow to instantiate internal classes. Never use this !" And nobody could complain if this cause segfault. Remi.