Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95384 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15414 invoked from network); 22 Aug 2016 16:01:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 16:01:02 -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.45 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:35818] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/43-33251-DB12BB75 for ; Mon, 22 Aug 2016 12:01:01 -0400 Received: by mail-wm0-f45.google.com with SMTP id f65so127024951wmi.0 for ; Mon, 22 Aug 2016 09:01:01 -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:content-transfer-encoding; bh=iIWT0fTZtdD2OOD+1S+MZzxV8YkGsJ0StTtkQnCLZ9Q=; b=ljaayuO22MiEGKzm+CKWcM9pwg+uv2yanQDOlzttHznsBkbJEFU/c0c3keFTBYNLjV DuN4Cn0H6rWjoaqFUFpF1HcPq4j1+YmuoQiLFUm8D2F4NSPF9AZzmSm29a0Tds9Bttf4 J9/02mtfOSeah4HouFzKb57nrmCbKIUQzZ2VdhjqYS5pfV2P5GnCPIGBFNddwGXlbz06 UhOWl6sVYieLlVVb6awZrQDUG0VnqM+odW/i0lSyXXd7/dJ01ttgPrwR7sXNxUbxUdwb IDn07Xe+18lBiTL+c4BLQHKsX832JE4CAIt8UtQaYmZP54stCF0c0hY+Kuz8tkLzjV76 pfUQ== 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:content-transfer-encoding; bh=iIWT0fTZtdD2OOD+1S+MZzxV8YkGsJ0StTtkQnCLZ9Q=; b=DUl9HY0g5YVJscfjmObK+bk7on5SGMuK28hkpKFybRKJHri4e/T3t0q64lp5bvB34z pRH8VU01jSfz0UfII79yujIOsC2WhuvVERuUKA5L5Aq3wJJZ07C6+1sTAJ9X6o4lyZEz hLq3PmumS7+IldrL5KEV00qKsUOy3Lc1yjv/RHR6izLd51JbRI+Pvgc3Q1t/XYchCAvy 4+gp0baLVn8zU64JaYdvrirVwyPe1o/TVijZh21UQ/GtZ7ghbWez3Dnsv6REm0xCbo8v GvW9tXB0Y29tXUfWLdgdkWhp14fceySUOcHFxQmdo9G3NK0vrtwj71s+NVQaWtUbddT5 sKGg== X-Gm-Message-State: AEkoouvgVNY8fWLPvNdW49w96qtfkStrfbTIGJHq90pm9Xf1YY3UFVYd5isQ+XyZbecQ5Tqm7mmDmu7y3r0o/A== X-Received: by 10.194.76.204 with SMTP id m12mr17861681wjw.186.1471881658808; Mon, 22 Aug 2016 09:00:58 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.45.4 with HTTP; Mon, 22 Aug 2016 09:00:18 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2016 18:00:18 +0200 X-Google-Sender-Auth: vAvSW4r-y75m2mg9QKDFWY_cfBU Message-ID: To: Alexander Lisachenko Cc: Rowan Collins , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given From: jpauli@php.net (Julien Pauli) I agree this is a BC break and should not stay as-is in source code. It makes some testsuites fail, that did not fail before ; thus it breaks th= ings. 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. Julien On Mon, Aug 22, 2016 at 5:55 PM, Alexander Lisachenko wrote: > First argument can be a normal string with a valid scope class name for > static methods. This can be useful for calling parent static methods, see > my example. > > I think this will be comparable with Closure::call() method and scope > binding. > > =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 22 = =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2016 =D0=B3. =D0=BF=D0=BE=D0=BB= =D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Rowan Collins =D0=BD= =D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > >> On 22/08/2016 16:40, Christoph M. Becker wrote: >> >>> It is still ignored if it is a valid object, so the current beta's >>>> > behaviour doesn't actually make a lot of sense. >>>> >>> Well, see . Only as of 7.1.0beta3 ::invoke() >>> matches the behavior of ::invokeArgs(). >>> >> >> OK, so that's a further inconsistency. The current version still doesn't >> actually make sense, though. If you want to validate that the correct >> argument is being passed, then the only value allowed should be null. >> >> If so desired, I can revert that commit, but I wouldn't be happy with >>> sticking with a completely unused parameter, which obviously has been >>> and still is misunderstood. >>> >> >> The parameter is still unused, and can be any object. The only sane >> validation would be to check explicitly for null, which is documented as >> the correct argument for both invoke() and invokeArgs(). >> >> Regards, >> -- >> Rowan Collins >> [IMSoP] >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >>