1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00
Commit Graph

7 Commits

Author SHA1 Message Date
Nikita Popov
ee510eed68 Deprecate partially supported callables
This deprecates all callables that are accepted by
call_user_func($callable) but not by $callable(). In particular:

    "self::method"
    "parent::method"
    "static::method"
    ["self", "method"]
    ["parent", "method"]
    ["static", "method"]
    ["Foo", "Bar::method"]
    [new Foo, "Bar::method"]

RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables

Closes GH-7446.
2021-10-22 10:15:24 +02:00
Alex Dowad
907bf786f1 Remove XFAIL from tests for 'bug' 48770
Bug 48770 was opened due to conflicting expectations about the behavior of:

    call_user_func_array(array($this, 'parent::methodName'), array($arg1,$arg2))

The one reporting the 'bug' seemed to think that since the method name was prefixed with
`parent::`, it should call the method in the superclass of the *class where this code appears*.
However, `$this` might be an instance of a subclass. If so, then it is quite reasonable that
`call_user_func_array` will call the method as defined in the superclass of *the receiver*.

So the 'bug' is not really a bug. Therefore, there is no need for an XFAIL in the tests. They
should just pass.

Amend tests to reflect the actual expected behavior of `call_user_func_array`, not what the
person who reported bug 48770 thought it should be.

Closes GH-5386.
2020-04-14 17:41:52 +02:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Gabriel Caruso
9c144e0d82 Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Felipe Pena
f1be9ef385 - Tests related to bug #48770 2009-07-19 03:25:49 +00:00