1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
Máté Kocsis 93640db4d5 Improve error message for deprecated methods 2020-05-14 17:23:31 +02:00
Nikita Popov 28af364d2a Deprecate old ReflectionParameter type declaration APIs
This deprecates:

    ReflectionParameter::isArray()
    ReflectionParameter::isCallable()
    ReflectionParameter::getClass()

These APIs have been superseded by ReflectionParameter::getType()
since PHP 7.0. Types introduced since that time are not available
through the old APIs, and their behavior is getting increasingly
confusing. This is how they interact with PHP 8 union types:

 * isArray() will return true if the type is array or ?array,
   but not any other union type
 * Same for isCallable().
 * getClass() will return a class for T|int etc, as long as the
   union only contains a single type. T1|T2 will return null.

This behavior is not particularly reasonable or useful, and will
get more confusing as new type system extensions are added.

Closes GH-5209.
2020-05-11 17:01:40 +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
Nikita Popov 162aa1a5fc Deprecate __autoload() 2017-02-03 18:52:57 +01:00
Xinchen Hui 610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Sebastian Bergmann 30a8d14fbc Drop SKIPIF check for ext/reflection. 2008-05-24 13:34:22 +00:00
Marcus Boerger 0add197ec8 - MFH:
- Fix ReflectionParameter
  . Reintroduce getClass()
  . Change getDeclaringClass() to return what it suggests
  . (inactive but tested) Add getDeclaringFunction()
  . (inactive but tested) Add getPosition()
- Fix tests accordingly
# This also fixes Bug #36687 ReflectionParameter::getDeclaringClass returns
# wrong result
2006-03-12 17:22:34 +00:00
Marcus Boerger e16bba12b1 - Prefix test names
- Add missing skipif
2006-03-12 12:38:25 +00:00
Johannes Schlüter 3e056bc13c - Fix tests 2006-02-27 00:18:59 +00:00
Dmitry Stogov 863bf8a574 Fixed bug #29268 (__autoload() not called with Reflection->getClass()) 2005-10-21 08:03:28 +00:00