Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54937 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30791 invoked from network); 25 Aug 2011 12:49:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2011 12:49:07 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:60769] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/85-00227-2C4465E4 for ; Thu, 25 Aug 2011 08:49:07 -0400 Received: by bkd19 with SMTP id 19so1777249bkd.29 for ; Thu, 25 Aug 2011 05:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=l4wnLrkvsMu87M4o10mENfP7bmFdsxAF6bYfw0LeM28=; b=sDeSob6DkDUCQQW1si0ObTGckCtB5Y3jbrcKbKXm6CrDn8DaWgbCEGotSsq+dx4xKt cDlHOt1W2OjLl1VBFsmNJd1PeIjfqZWTcsHiuaUWS00O8EVKU0BzK3Zdr57FBH0ox0Lq 8uCIH34121iRea45G/vxQxM0++2UJnrJNA6n4= MIME-Version: 1.0 Received: by 10.204.135.1 with SMTP id l1mr3001019bkt.270.1314276543222; Thu, 25 Aug 2011 05:49:03 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.204.69.211 with HTTP; Thu, 25 Aug 2011 05:49:03 -0700 (PDT) In-Reply-To: <4E564378.1030206@php.net> References: <4E5619ED.40609@php.net> <4E564378.1030206@php.net> Date: Thu, 25 Aug 2011 14:49:03 +0200 X-Google-Sender-Auth: Hz9lQSqFQDmyCkpx5_tzE1vvbYo Message-ID: To: Sebastian Bergmann Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor() From: colder@php.net (Etienne Kneuss) Hi, On Thu, Aug 25, 2011 at 14:43, Sebastian Bergmann wrote= : > On 08/25/2011 02:39 PM, Etienne Kneuss wrote: >> >> To me this feature makes no sense. But if people find use for it and >> it remains in Reflection, I won't object to it, so +0. > > =C2=A0It should only be used for meta programming, of course ;-) > >> If an internal class can't behave well without a constructor call, >> that should already be fixed/prevented, as it's already possible by >> extending it. > > =C2=A0I second that emotion but as long as those internal classes are not > =C2=A0fixed I think it makes sense to disallow creating objects of intern= al > =C2=A0classes without invoking their constructor. It is already possible to do that currently, with or without this feature, so you're not preventing much abuse by doing that here. As I said, artificial distinction. This feature however alters the necessary checks for missing constructor calls (at least the ones implemented in SPL as of 5.4), as those assume a userland subclass. > > -- > Sebastian Bergmann =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0Co-Founder and Principal Consultant > http://sebastian-bergmann.de/ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://thePHP.cc/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Etienne Kneuss http://www.colder.ch