Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95390 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32398 invoked from network); 22 Aug 2016 19:57:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 19:57:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.54 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.54 mail-pa0-f54.google.com Received: from [209.85.220.54] ([209.85.220.54:35865] helo=mail-pa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/E5-33251-3495BB75 for ; Mon, 22 Aug 2016 15:57:56 -0400 Received: by mail-pa0-f54.google.com with SMTP id pp5so40452094pac.3 for ; Mon, 22 Aug 2016 12:57:55 -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; bh=BvFSBrQrwu2LNODmY9LnDU/MUBModYO54IHS6eVmaVQ=; b=LHvKfsT2PPvl/PwSNb851yjgwRB2y2JVrDYIc2zapmuT4Lfhyn5UCDvptth/nE2zeA WRGjf7EmwWOCDFqseBrui7SAOiv9vnE2pn5/MXXCj/gU4nS1hCeV9dJ41lFzQxfGoLG3 MVS+9ZnYmwYW8xna1sLQz1XhyJ4CyiOUrVxz2e4R3OMjKVBk/lNOpgjtjHK0DTy00oa8 uidahcM45memeMXneAohdA5QcABHY7OtuuV3U5ASAf6FZtkgPF6RI6qrdSjD5MhKB9oV trnnfb40EzK1LiX+I6o82PVuAdf7KUvtvK+q5V7g2S1c8KtMKbvDZLE0+9cTE3lCRiEo IqWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=BvFSBrQrwu2LNODmY9LnDU/MUBModYO54IHS6eVmaVQ=; b=aJ+X1iYFDUjwhtAoFcf+QAueTeBItYONQfZf9IdIuSD3CY2l/rnx4uQfE/uuBtooT8 yBMw4syPkucDkr1zVZBr2FFVh3h67noXXjwtzC38+fKT/sQLNdVm0pXDj/zNYejttaYu XI2NCXAFvaBK7DHN9/UZgv2/EjtIYaELhQuOHntHUHScsxaeBitsndhKk7EW3xZh+vDk pa1xYhrkmzLCsJ50R/MUnb/q07YbSXdrm1L1T1sXN2fyXIMDDAr0cQX+n9ODpB5ue2zV puAvbOo7iOb90FGj6bzfa7STMjpi07ToU9+QrX+o3v53tnRtdGxU/PwAajyq35U55LSI DSfw== X-Gm-Message-State: AEkoouvI0ccaakEBRxkBAc0546flyqioafhFLlMNoIoIAOgvyjDG48zBPllD0wjxOEJ9bL2CUQlaZNmq4JGepQ== X-Received: by 10.66.32.131 with SMTP id j3mr46331527pai.58.1471895873067; Mon, 22 Aug 2016 12:57:53 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.66.24.42 with HTTP; Mon, 22 Aug 2016 12:57:51 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2016 13:57:51 -0600 X-Google-Sender-Auth: ZOdQ0UMkB-h6VfPpnGz7dy6KAe8 Message-ID: To: "Christoph M. Becker" Cc: Julien Pauli , Alexander Lisachenko , Rowan Collins , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1136c052a922b4053aae7651 Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given From: levim@php.net (Levi Morrison) --001a1136c052a922b4053aae7651 Content-Type: text/plain; charset=UTF-8 On Mon, Aug 22, 2016 at 10:30 AM, Christoph M. Becker wrote: > On 22.08.2016 at 18:00, Julien Pauli wrote: > > > I agree this is a BC break and should not stay as-is in source code. > > I wonder why we have more than 100 lines of "Backward incompatible > changes" in the PHP 7.1.0beta3 changelog[1], if BC breaks shouldn't be > introduced in a minor release. > > > It makes some testsuites fail, that did not fail before ; thus it breaks > things. > > An estimated 10% (at least) of my *bugfixes* in GD broke at least one > PHPT, because the test was broken in the first place. > > > I think @Alexander is right. > > We should allow passing a string, and perform some Late Static Binding > > through it. > > That would solve the BC Break problem as well as extend the feature in > > a more PHP-friendly way. > > Are you sure that would solve the BC break? As it were, one could pass > an arbitrary string. I can easily imagine that some refactoring > introduced a new class in a hierarchy, but nobody noticed that an > ::invoke() call would have to be adjusted accordingly. Suddenly > changing the meaning of the first parameter may well introduce a > behavioral change. > > [1] > I was a little unclear in the beginning, so let me clear something up now: if it's not documented how can anyone be sure what the correct behavior is? Attempting to preserve backwards compatibility on something undefined is meaningless. Now if something was simply not documented that's a bit different. I think the ideal but difficult path forward is to find where it was introduced and pray the commit log or something else will indicate the behavior. Only then can we properly preserve it. Until then it is undefined behavior that I don't care one whit about. And attempting to "improve it" by adding late static binding somehow would also be pointless until the original behavior is identified. As it stands I am fine to keep the BC break or revert it - doesn't really matter. But if anyone *does* care then they need to do some digging. --001a1136c052a922b4053aae7651--