Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95404 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90351 invoked from network); 23 Aug 2016 12:56:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Aug 2016 12:56:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-lf0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:35252] helo=mail-lf0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/D4-49014-C084CB75 for ; Tue, 23 Aug 2016 08:56:45 -0400 Received: by mail-lf0-f53.google.com with SMTP id f93so100159904lfi.2 for ; Tue, 23 Aug 2016 05:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Fv9xRR56iTaWau5XudXMcLjUhYG4iI1e3oGEcwu3n94=; b=qto+ecX44cDGJEHupmlrkPykFt+PO3oJ6johmPXL0/v+7k/WAg9puQSMXoHgBSXqov e1zuRxCSdxB/f2uMpPfiKqjDTJ8HN7NhrS0yAsKIIfPOj7pdNe9eD7hS6Vsbp2xo2J5m WmUKY2noaXNQMMhjQloDmcwf3aylgdBnyQduhQianJVZNuf5TGdLbiJcqwROjwCcRHjb emqTnzwDWerzgrNTspQmL/V2sR9P470298/SpaoHyG+yJ9z29BiHCUDMO6EXY+BLAe+B 4vofMXpAKoLpamKu2w9P8u7AZYwIjl9oCavnpme3Qxxa642r9cOSgM2umYnKokZAFcck dv4Q== 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:from:date :message-id:subject:to:cc; bh=Fv9xRR56iTaWau5XudXMcLjUhYG4iI1e3oGEcwu3n94=; b=fG+sODreuJwN9V2nKOdKKKMV/+TgkDnhQFglZ6gZbaErOXeookcZ7SrrB+ZkwOgAyu FECvYLNNDtuklglFKXDzKH/86077TUHeta28KZU+i5q4bVIgvNhd4VOBiyBhmpSMZ4bA iK0gPSfXzbYs17qX4XE+4cJp5i83RPcTVrliEPt4UHG+WX61g6EmQT4fNbX95lmNWn14 HtdJpiYAglb+Mxm/UXVlT3tH4Rb1RE+WUlmMdTJiQpqPI12uEd9/qOdjDfDo6E8Bpj4i 751XDaaWaLT7AMeDodLxa9jnBpK/ClmGZFvmmwuUt8T9vf8vEX69Cz9HrvBVYc9+rrcQ 3ZJA== X-Gm-Message-State: AEkoous7JVb+UfWFAY2//xGtyhndxMrwq84v9iWVG7MXX0t+F0gTTq3ahDopnf1eNl3haJx5wx2sju3tkZkIBw== X-Received: by 10.25.159.205 with SMTP id i196mr7442855lfe.45.1471957002007; Tue, 23 Aug 2016 05:56:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.196.144 with HTTP; Tue, 23 Aug 2016 05:56:41 -0700 (PDT) In-Reply-To: References: <031a2bf1-1996-1144-2b85-e10a40be9514@gmail.com> <7b81c830-1d05-a4ac-4713-1bb67cbec12c@gmx.de> Date: Tue, 23 Aug 2016 15:56:41 +0300 Message-ID: To: "Christoph M. Becker" Cc: Julien Pauli , Levi Morrison , Rowan Collins , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11402ace3abd4d053abcb211 Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1to be object, string given From: lisachenko.it@gmail.com (Alexander Lisachenko) --001a11402ace3abd4d053abcb211 Content-Type: text/plain; charset=UTF-8 2016-08-23 14:51 GMT+03:00 Christoph M. Becker : > I suggest to deprecate all other types than NULL as first arg for static > methods, because passing an int, for instance, makes even less sense as > Rowan has already pointed out elsewhere in this thread. > Alternative suggestion (vote for Julien's patch): use first argument as a string with LSB scope name, see my message from late 2013 year: http://markmail.org/message/ogeh33jedumgo5lx. I agree, that all other types don't make any sense. So my suggestion is following: for dynamic methods it should accept object or null. Null can mean that we want to unbind the method from the object and maybe call it like a closure? (just compare this with Closure::bindTo behaviour). For static methods this could be object (why not - it will be ignored), string (in this case it will be a scope name if we want to call parent method with preserving Late Static Binding) or just null (null will be equal to the string with object class name) Thoughts? --001a11402ace3abd4d053abcb211--