diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-21 16:13:09 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-22 11:26:02 +0200 |
commit | 530a8a38540e36a485f341d487529ade2b5d9c98 (patch) | |
tree | de5f307551d8c28159c0a63dac7ddcd3b0c8bfbd /ext/reflection/php_reflection.c | |
parent | 1faea28cdd3677e47a0951367571bf51866105fd (diff) | |
download | php-git-530a8a38540e36a485f341d487529ade2b5d9c98.tar.gz |
Fix and undeprecate ReflectionType::__toString()
Add deprecated _ZendTestClass::__toString() method to preserve
an existing test.
ReflectionType::__toString() will now return a complete
representation of the type, as it should have originally. Users
that relied on nullability being absent should have been pushed
to ReflectionNamedType::getName() by the deprecation of
ReflectionType::__toString() in PHP 7.1 / PHP 7.4.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index e4a065989a..d3e8a04006 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2818,7 +2818,7 @@ ZEND_METHOD(reflection_type, __toString) } GET_REFLECTION_OBJECT_PTR(param); - RETURN_STR(zend_type_to_string(ZEND_TYPE_WITHOUT_NULL(param->type))); + RETURN_STR(zend_type_to_string(param->type)); } /* }}} */ @@ -6621,7 +6621,7 @@ static const zend_function_entry reflection_parameter_functions[] = { 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, __toString, arginfo_reflection__void, ZEND_ACC_DEPRECATED) + ZEND_ME(reflection_type, __toString, arginfo_reflection__void, 0) PHP_FE_END }; |