Skip to content

Commit 40a07f9

Browse files
committed
Add since data for Reflection
1 parent fb1d593 commit 40a07f9

10 files changed

+79
-59
lines changed

ext/reflection/php_reflection.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function isAnonymous(): bool {}
128128
/**
129129
* @tentative-return-type
130130
*/
131-
#[\Deprecated(message: "as ReflectionFunction can no longer be constructed for disabled functions")]
131+
#[\Deprecated(since: '8.0', message: "as ReflectionFunction can no longer be constructed for disabled functions")]
132132
public function isDisabled(): bool {}
133133

134134
/** @tentative-return-type */
@@ -594,7 +594,7 @@ public function getDeclaringClass(): ?ReflectionClass {}
594594
/**
595595
* @tentative-return-type
596596
*/
597-
#[\Deprecated(message: "use ReflectionParameter::getType() instead")]
597+
#[\Deprecated(since: '8.0', message: "use ReflectionParameter::getType() instead")]
598598
public function getClass(): ?ReflectionClass {}
599599

600600
/** @tentative-return-type */
@@ -606,13 +606,13 @@ public function getType(): ?ReflectionType {}
606606
/**
607607
* @tentative-return-type
608608
*/
609-
#[\Deprecated(message: "use ReflectionParameter::getType() instead")]
609+
#[\Deprecated(since: '8.0', message: "use ReflectionParameter::getType() instead")]
610610
public function isArray(): bool {}
611611

612612
/**
613613
* @tentative-return-type
614614
*/
615-
#[\Deprecated(message: "use ReflectionParameter::getType() instead")]
615+
#[\Deprecated(since: '8.0', message: "use ReflectionParameter::getType() instead")]
616616
public function isCallable(): bool {}
617617

618618
/** @tentative-return-type */

ext/reflection/php_reflection_arginfo.h

Lines changed: 35 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/reflection/tests/ReflectionClass_isArray.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ foreach ($reflection->getParameters() as $parameter) {
1414
}
1515
?>
1616
--EXPECTF--
17-
Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
17+
Deprecated: Method ReflectionParameter::isArray() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
1818
bool(true)
1919

20-
Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
20+
Deprecated: Method ReflectionParameter::isArray() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
2121
bool(true)
2222

23-
Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
23+
Deprecated: Method ReflectionParameter::isArray() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
2424
bool(false)
2525

26-
Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
26+
Deprecated: Method ReflectionParameter::isArray() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
2727
bool(false)

ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ var_dump($rf->isDisabled());
2020
--EXPECTF--
2121
Function is_file() does not exist
2222

23-
Deprecated: Method ReflectionFunction::isDisabled() is deprecated, as ReflectionFunction can no longer be constructed for disabled functions in %s on line %d
23+
Deprecated: Method ReflectionFunction::isDisabled() is deprecated since 8.0, as ReflectionFunction can no longer be constructed for disabled functions in %s on line %d
2424
bool(false)

ext/reflection/tests/ReflectionParameter_getClass_self_parent_closure.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ try {
2727

2828
?>
2929
--EXPECTF--
30-
Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
30+
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
3131
Parameter uses "self" as type but function is not a class member
3232

33-
Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
33+
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
3434
Parameter uses "parent" as type but function is not a class member
3535

36-
Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
36+
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
3737
Parameter uses "parent" as type although class does not have a parent

ext/reflection/tests/bug26695.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ $class = $params[0]->getClass();
2020
var_dump($class->getName());
2121
?>
2222
--EXPECTF--
23-
Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
23+
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
2424
string(3) "Foo"

ext/reflection/tests/bug29268.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ foreach($parameters as $parameter)
2222
echo "ok\n";
2323
?>
2424
--EXPECTF--
25-
Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
25+
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
2626
__autoload(A)
2727
A
2828
ok

ext/reflection/tests/bug39884.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $refParam = new ReflectionParameter(array('stubParamTest', 'paramTest'), 'param'
1616
var_dump($refParam->getClass());
1717
?>
1818
--EXPECTF--
19-
Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
19+
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
2020
object(ReflectionClass)#4 (1) {
2121
["name"]=>
2222
string(13) "stubParamTest"

ext/reflection/tests/bug69802.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo $r,"\n";
1313
--EXPECTF--
1414
string(1) "x"
1515

16-
Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d
16+
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
1717
object(ReflectionClass)#4 (1) {
1818
["name"]=>
1919
string(8) "stdClass"

0 commit comments

Comments
 (0)