Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76159 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28007 invoked from network); 26 Jul 2014 20:19:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2014 20:19:51 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.53 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.192.53 mail-qg0-f53.google.com Received: from [209.85.192.53] ([209.85.192.53:55833] helo=mail-qg0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/43-22380-66D04D35 for ; Sat, 26 Jul 2014 16:19:50 -0400 Received: by mail-qg0-f53.google.com with SMTP id q107so6529068qgd.26 for ; Sat, 26 Jul 2014 13:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ag21OnxiNNvHHUkQYN0gOkFMdNCGSq+m6u/vosgvYCI=; b=OR+G4uWcM8r9S3T70PnHESkGePgtb7QAfnOy7OK8a62FthymULNh1cqaNr+ausBdD1 3u/ygeKrqIDxMgCQbrQVAmhrdPOvtMb6ND5xw3C2KwxEassoawkMr9+2KzLacvSkS4m5 ns9zx0p+bTeL97evL7UIbz2eFAYF6ziKVOpVlUexZHfL1e6x/PJ54SdyENAk91qWIb8F vFsJLGmhj+HjpLE9++1HFPBSXnxa1JYg56oeBu4HkAvFlVjEVKmeVmdaiiUREKm8M/Hu RRWD/7ECnRGu8MEmEXS39KyfO48nbjCM+vYi2c42WjHEjXeSwFkNbujYC2mEZtZo1QZl YmKQ== MIME-Version: 1.0 X-Received: by 10.224.96.137 with SMTP id h9mr42240893qan.96.1406405996090; Sat, 26 Jul 2014 13:19:56 -0700 (PDT) Received: by 10.140.102.111 with HTTP; Sat, 26 Jul 2014 13:19:55 -0700 (PDT) In-Reply-To: References: <53A1C722.9060501@fedoraproject.org> <53A21137.6010705@sugarcrm.com> <53A2A9BD.1070603@sugarcrm.com> <53A3874E.20704@sugarcrm.com> <53A62AFF.4080302@sugarcrm.com> <53B10D59.4060206@sugarcrm.com> <53D2DA3B.9020308@sugarcrm.com> <53D2E7A2.9010209@sugarcrm.com> Date: Sat, 26 Jul 2014 22:19:55 +0200 Message-ID: To: Julien Pauli Cc: Stas Malyshev , Alexey Zakhlestin , Marco Pivetta , Sebastian Bergmann , Remi Collet , PHP Internals Content-Type: multipart/alternative; boundary=001a11c2e0a8ce9c5704ff1e6968 Subject: Re: [PHP-DEV] Problems with the fix for the BC break introduced in 5.4.29 and 5.5.13 From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c2e0a8ce9c5704ff1e6968 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Jul 26, 2014 at 9:55 PM, Julien Pauli wrote: > On Sat, Jul 26, 2014 at 1:26 AM, Stas Malyshev > wrote: > >> Hi! >> >> > yeah, that would work ofc, but as these libs seems to have instanitate >> > arbitrary classes, that would require either generating files on the f= ly >> > and including them or simply evaling them, but of those are a bit >> > dirtier than using Reflection for the same job. >> >> True but that's what phpunit, etc. are doing for mocks anyway, aren't >> they? >> >> > true, but it can also be used to argue for loosening the restriction, >> > why restrict something from Reflection, which is already possible from >> > simple class extension. >> >> I agree, probably makes sense to allow it if you can do it anyway. >> Reflection is not something you can trigger without explicit codding >> (unlike O: thing) so it's fine with me. >> >> > a nice thing from OOP POV and also will cause problems if/when we >> > introduce a reflection method removing final from classes/methods (thi= s >> > was already proposed not that long ago with a working patch but was >> > turned down because other reasons). >> >> That probably wouldn't be a good idea, especially for internal classes. > > > > Like I said in a previous mail, only Dom, Mysqli and sqlite3 need patch > to be able to work with only create_object invoked. > I'm not sure about COM as I can't setup a test environment for it. > > I recently started patching mysqli. > I think it is feasable to have all of them patched so that > newInstanceWithoutConstructor() may be safely "opened" to internal classe= s, > for 5.6.0. > that would be nice. > > A quick word as well to say I'm against giving the opportunity to userlan= d > to remove the final attribute, as this will lead to lots of bugs, some of > them not even fixable I think. > just to clarify: I didn't suggested to introduce this method (it was proposed by somebody else in the past), just mentioned that I don't think that turning classes/constructors into final only to be safe from these kind of problems is a bad idea imo, and one of my arguments was that there is a chance that we would like to allow userland to override final, and it would cause problems anyways. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c2e0a8ce9c5704ff1e6968--