Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76158 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25640 invoked from network); 26 Jul 2014 19:56:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2014 19:56:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.175 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.220.175 mail-vc0-f175.google.com Received: from [209.85.220.175] ([209.85.220.175:63863] helo=mail-vc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/E2-22380-FE704D35 for ; Sat, 26 Jul 2014 15:56:32 -0400 Received: by mail-vc0-f175.google.com with SMTP id ik5so480312vcb.20 for ; Sat, 26 Jul 2014 12:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=jPxsBPFqdFDdoIWQCTKPTaKJUBaa3LkRaMYdzVDP4u0=; b=Y3nlbvyJlF8Zog9WKofDwhDksQgHKsO1VTuB6blvmBIYwVrZEdu/JtqjBHqyYkcR9L y4N3q8TN2ojZggbl2Fqto5blW5K3X909juJ/15lq1oRQIuUryRNBAAkGgvDS/rGQiIoW gEKQP62yK/t/hsNbc4Ga7GYlso+Twgkmw0p1VFM87ZUpjJ0zBWNhHmKXv5rygMTaVA++ 6J3PLKGuascylW4rQHvuQncKGLlAnL3LBc2dzvu/lWDqf8aHB1jng7MGiwfkcgmwgvCs +PHKeXHRPeEi2BMHKb9RsGfumX+ouw+x5GpNrQqCruJ0gsX33WjtUVNuGN8N4OiuYj7n 9rsA== X-Received: by 10.52.129.165 with SMTP id nx5mr3791607vdb.25.1406404597694; Sat, 26 Jul 2014 12:56:37 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.81.68 with HTTP; Sat, 26 Jul 2014 12:55:56 -0700 (PDT) In-Reply-To: <53D2E7A2.9010209@sugarcrm.com> 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 21:55:56 +0200 X-Google-Sender-Auth: R9_U8lgvto2ajEE9pYhHQlKAcfs Message-ID: To: Stas Malyshev Cc: Ferenc Kovacs , Alexey Zakhlestin , Marco Pivetta , Sebastian Bergmann , Remi Collet , PHP Internals Content-Type: multipart/alternative; boundary=bcaec529a00774c54704ff1e1697 Subject: Re: [PHP-DEV] Problems with the fix for the BC break introduced in 5.4.29 and 5.5.13 From: jpauli@php.net (Julien Pauli) --bcaec529a00774c54704ff1e1697 Content-Type: text/plain; charset=UTF-8 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 fly > > 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 (this > > 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 classes, for 5.6.0. A quick word as well to say I'm against giving the opportunity to userland to remove the final attribute, as this will lead to lots of bugs, some of them not even fixable I think. Julien.Pauli --bcaec529a00774c54704ff1e1697--