summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-05 15:33:52 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-05 15:33:52 +0200
commitb964298c19c685f61542bbf30c49bd164b67c653 (patch)
treee21bed75dd12b603b88440bf1abb98b67aba40c3 /ext/reflection/php_reflection.c
parenta31f46421d7bf6f55dd9ac5876b8e2eacf7e0708 (diff)
downloadphp-git-b964298c19c685f61542bbf30c49bd164b67c653.tar.gz
Deprecate ReflectionType::__toString()
We weren't able to do this in 7.1 because the deprecation notice may be converted to an exception and __toString() can't throw, which means that it ultimately become a fatal error. This issue is resolved now, so we can mark the method as deprecated.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 4623efb3cf..ab51925180 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -6665,10 +6665,7 @@ static const zend_function_entry reflection_type_functions[] = {
ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_type, allowsNull, arginfo_reflection__void, 0)
ZEND_ME(reflection_type, isBuiltin, arginfo_reflection__void, 0)
- /* ReflectionType::__toString() is deprecated, but we currently do not mark it as such
- * due to bad interaction with the PHPUnit error handler and exceptions in __toString().
- * See PR2137. */
- ZEND_ME(reflection_type, __toString, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_type, __toString, arginfo_reflection__void, ZEND_ACC_DEPRECATED)
PHP_FE_END
};