Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95386 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19344 invoked from network); 22 Aug 2016 16:35:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 16:35:04 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.47 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.47 mail-wm0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:38791] helo=mail-wm0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/F3-33251-7B92BB75 for ; Mon, 22 Aug 2016 12:35:03 -0400 Received: by mail-wm0-f47.google.com with SMTP id o80so153692027wme.1 for ; Mon, 22 Aug 2016 09:35:03 -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=Epdeqf7dLUsFvbza+ASppAiX56M5ZXtD7Ktc9dH+DXw=; b=xBiXmMdS5ygSY7oWnG17lOxvDqHNx26qy+7qLQB4XXb7qWjws8ZubtfkQmQYdD88MS YT/wtz7/NUn/vhovYHxHhRSfwRIf7AayWLzkcBiFMNEiSRT6kdjEh2+KGTllE0FRlTcP v7kbkPUHle4wfdYE5XE5nvtzB+W7LJsiHpKQ3X5ClS1w0FL/hvZOsAgjduacZeeHALNH upGk5MLx1BZ/t0zOaQRt95mz+shA1I/QxjUSCQIPSYU8euvn7L67vNpidej5uPnam+6P 4yMCkN59OY+bT2qcfhTpmpqWub/q6uCxmvIBxqx2pYDm1GVTQcB+7xR/cG674OBA3Quq kqmA== 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=Epdeqf7dLUsFvbza+ASppAiX56M5ZXtD7Ktc9dH+DXw=; b=lcwUKcjpoq71O9ExXgs4NVzxROV3JsacHX9O2nEP+oV2c+mcZg6Exmvl2fUgckkgKR Kol+zFjylCB4NvRQ4qch5uIlc53dYSw9Hv+lqVmhvl2Si2Lque7iQFWLsD2WZfH9CGiJ ZowZ5zRCuvcCEk4WCk1TTMWwNyHQ0H5QRwL+0DoZW/pEHvdOcB7Uyay3aZK6QT6fjoCU fKeuK/fVJmJrxSihYo/hf45/Bet7u6/zzlXFWu8MCo2yo/pBVmpIjLrrGv81GZpMlXAX 04Z64L4UvbUdAEigvlmbZik2pwxnBDgh63p+ittblgENcHbjQ1h096WmAH3ze0u6Fq46 t4mg== X-Gm-Message-State: AEkoouvD9Kw5Qk3McLa41J+15g/AIWqvdxvP4m7TZhyNKxH3Xj5TtuQo6rJM6ygwnRr7nNtdonAlQXngwkP4HQ== X-Received: by 10.194.76.204 with SMTP id m12mr17994954wjw.186.1471883700647; Mon, 22 Aug 2016 09:35:00 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.45.4 with HTTP; Mon, 22 Aug 2016 09:34:20 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2016 18:34:20 +0200 X-Google-Sender-Auth: 9q8T__VlibuTY_7BpRgDTAovciA Message-ID: To: "Christoph M. Becker" Cc: Alexander Lisachenko , Rowan Collins , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given From: jpauli@php.net (Julien Pauli) On Mon, Aug 22, 2016 at 6:30 PM, 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. Well, we must find a solution that tries to cope with everyone needs, and tries to make PHP more consistent if possible. I know it is not an easy topic , but I'm sure we'll find some consensus. I'll prepare a patch exposing my ideas soon. Julien