Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76423 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13962 invoked from network); 11 Aug 2014 10:58:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2014 10:58:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.173 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.173 mail-qc0-f173.google.com Received: from [209.85.216.173] ([209.85.216.173:39953] helo=mail-qc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/60-11469-DD1A8E35 for ; Mon, 11 Aug 2014 06:58:38 -0400 Received: by mail-qc0-f173.google.com with SMTP id w7so1399386qcr.18 for ; Mon, 11 Aug 2014 03:59:15 -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=eiHlaO/kJH35Vad1+3PjXN4pt1N7XkbmRQMHKrnM8Y4=; b=FJd2R/pY4S/KwOFF+7iRCFzIJMsPsGmpZKytKkn1HozE2uI57q9jjp1EoYSZ8G+om7 m8bfo80vbAsNlv+BbT6FfJpvVQTZbR9lRHLq3n+elJKR5DQJQOa6/OHnLhC1TzheHhGo HfkqfKfIQd8ZqsMlXEtgpMvfdfL9Qon1PZeHfb/k/4jJUqDel3rCXIiVqhl5vNIpWjK+ EGCoP9IDDRfQsqvf/HyeiKbr/YojYPnQ4GOeiU9YFJrF3DjSOAlJYYcYvbFl9UZfg9SY iEzhIk4t2C7UM2PU5MNLz0KapOtEuIyzIc2YUmOCLdUEwYOJZmDRPjYZs03IQeV6FBQi 98jg== MIME-Version: 1.0 X-Received: by 10.229.225.131 with SMTP id is3mr61594106qcb.2.1407754755476; Mon, 11 Aug 2014 03:59:15 -0700 (PDT) Received: by 10.140.102.111 with HTTP; Mon, 11 Aug 2014 03:59:15 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Aug 2014 12:59:15 +0200 Message-ID: To: Tom Oram Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a1134a2ba2193bd0500587219 Subject: Re: [PHP-DEV] Reflection to remove final From: tyra3l@gmail.com (Ferenc Kovacs) --001a1134a2ba2193bd0500587219 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Aug 9, 2014 at 12:35 PM, Tom Oram wrote: > I've just been looking back at the history of this previous conversation.= .. > > http://marc.info/?l=3Dphp-internals&m=3D132673741606531&w=3D2 > > as a mockist tester I'd really REALLY like to see this be possible but I > can see the problem with the original patch modifying the actual existing > class. > > One solution I propose is rather than modify it would it be possible for > the reflection class to be able to duplicate the class with the finals > removed so something like this could be possible: > > final class A > { > } > > $r =3D new ReflectionClass('A'); > > $r->defineExtendableClass('ExtendableA'); > > class MockA extends ExtendabledA > { > } > > I'm unfamiliar with the PHP codebase so I thought I'd just ask here to fi= nd > out if it sounds possible before diving into the code > > Thoughts? > > Regards, > Tom > apart from the thread you linked, we also touched this topic in the following pull request: https://github.com/php/php-src/pull/733 --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a1134a2ba2193bd0500587219--