[php-src] Issue #10259: ReflectionClass::getStaticProperties doesn't need null return type
| From: | othercorey | Date: | Sun, 08 Jan 2023 06:54:02 +0000 |
| Subject: | [php-src] Issue #10259: ReflectionClass::getStaticProperties doesn't need null return type | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243365@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10259
Author: othercorey
### Description
The following code:
```php
<?php
$r = new ReflectionMethod('ReflectionClass::getStaticProperties');
echo (string)$r->getTentativeReturnType();
```
Resulted in this output:
```
?array
```
But I expected this output instead:
```
array
```
Looks like the return paths were changed to RETURN_THROWS() in https://github.com/php/php-src/commit/8664ff7ae174c610769c36a712eeea80cc3ad933
and https://github.com/php/php-src/commit/817605917bae487ffbdc03226ec8f536b6d1bc66
but the stub wasn't updated.
Usually, after these cleanups, the stub is correct but the docs are outdated, however this seems to
be the wrong stub.
I'm not sure how to update the stub and generated code from it.
### PHP Version
8.1.14
### Operating System
_No response_