Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92022 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16923 invoked from network); 30 Mar 2016 12:07:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2016 12:07:53 -0000 Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.46 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.215.46 mail-lf0-f46.google.com Received: from [209.85.215.46] ([209.85.215.46:33554] helo=mail-lf0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 73/55-24137-891CBF65 for ; Wed, 30 Mar 2016 07:07:53 -0500 Received: by mail-lf0-f46.google.com with SMTP id p188so7140244lfd.0 for ; Wed, 30 Mar 2016 05:07:52 -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; bh=BsfF+3DobJ+q6y7vYmx1AHqGgdYY5juLvuO3z3vURog=; b=X5t/vAhT0e7ubRUNLxpq7i9VcLlmHYZ9kq9en2LbuzQGGKG4TJ3BkfOzDhl6N0QC1T eiayXYnJTQHtbs6vWrdxTEAsM0qH9E40ourk+H746qAzpT1hDkeDcLLnlzz72s4BkqnT lbO5aEljEbw1UQH65XtKxGTK58TASj7F1R8BCp/+R61QFsbpSUV5qcgzKlSmcSnxaShf Ve+MtNOqofrOrZhTbc9oB1Q+tQMqzUA4E8t43Fsj9pxt6kcMNIjhthVJ0n1cRoOKqfTp doDB+B+r+SACzzI8SXPSUyhVoAgtAtxdbEJMwJFgmiWQI12m8WOVnuymqXeD2H08yG+s MBGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=BsfF+3DobJ+q6y7vYmx1AHqGgdYY5juLvuO3z3vURog=; b=OQA7lYGhEPWnitdTLROEGCzD2HZzTMiFq7aRc/+wBy0TUYo5eLDD8GDSVYFKbqEvUK 2cW7MdfUs04/+0NHnfKmzpa5ekQDse0dCsz+qv+2qcqEistwx0e30jlexQLsuHYk/rBm oPkrsNxo02yp8Ev9e2hsBz2TfVH1d3ZGQqIzo+mhGwYrSXGoSug0eSASbXluRwJz7Bbq jsuahqfPLBWL6qOGFO3DPvDIDYWZU8MXD3z68b5dZCqD+ZjG+oFmP7yxA6pmF3+yAEdB S9qX+pbglJld2d9HLL4NFaULghBGtsFruhrGxWaBqjkqV1lirQwKltL9psApCGhLnEEO mjKg== X-Gm-Message-State: AD7BkJJBu0OSCDgQtT92Tb2ujmMxtrc4d575t8A9QxI6zprf5v8Rl4cvH1NRkBeV43Igz4qovCs4/pKho8sDVA== MIME-Version: 1.0 X-Received: by 10.25.145.149 with SMTP id t143mr3723985lfd.37.1459339669720; Wed, 30 Mar 2016 05:07:49 -0700 (PDT) Received: by 10.25.33.72 with HTTP; Wed, 30 Mar 2016 05:07:49 -0700 (PDT) In-Reply-To: References: Date: Wed, 30 Mar 2016 15:07:49 +0300 Message-ID: To: Nikita Popov Cc: Dmitry Stogov , Antony Dovgal , PHP internals Content-Type: multipart/alternative; boundary=001a1140219e9ed4f8052f42fe15 Subject: Re: [PHP-DEV] Forbid binding methods to incompatible $this From: lisachenko.it@gmail.com (Alexander Lisachenko) --001a1140219e9ed4f8052f42fe15 Content-Type: text/plain; charset=UTF-8 Hello, internals! Go! AOP was used closure rebinding to an incompatible context only for one minor specific feature, called privileged advices, where method was executing in the context of target class. But all main closure binding in the framework core work only with compatible contexts, so everything is ok with PHP7 now. So, this new patch is ok for me. Anyway, if I need this functionality again, I can convert methods to the closures via AST transformation of classes. 2016-03-30 14:02 GMT+03:00 Nikita Popov : > On Wed, Mar 30, 2016 at 11:34 AM, Dmitry Stogov wrote: > > > I agree, this ability is a dirty and annoying hack, but I'm sure, some > > people use it. > > > > Tony, you don't use this in the new runkit replacement? :) > > > > Thanks. Dmitry. > > > > Is this referring to https://github.com/badoo/soft-mocks? If so, searching > the codebase for getClosure gives no results, so it shouldn't be affected. > > I know that the Go! AOP framework used to do some odd things with closure > binding on methods. However their use case was *already* completely broken > by the limitations we added in 7.0 and the feature was removed. > > Nikita > --001a1140219e9ed4f8052f42fe15--