[php-src] Issue #11234: Stub generator @alias does not resolve class according to local namespace
| From: | dktapps | Date: | Fri, 12 May 2023 17:28:01 +0000 |
| Subject: | [php-src] Issue #11234: Stub generator @alias does not resolve class according to local namespace | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244436@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11234
Author: dktapps
### Description
build/gen_stub.php does not appear to take the class namespace into account when
resolving @alias tags. This causes linking errors during compilation.
The following code (abbreviated for the purposes of the issue):
```php
<?php
/**
* @generate-class-entries
*/
namespace pmmp\thread;
class Worker extends Thread
{
/**
* Shuts down the Worker after executing all the threaded tasks previously stacked
*
* @return bool A boolean indication of success
* @alias Thread::join
*/
public function shutdown() : bool{}
}
```
Resulted in this output:
```
ZEND_MALIAS(Thread, shutdown, join, arginfo_class_pmmp_thread_Worker_shutdown, ZEND_ACC_PUBLIC)
```
But I expected this output instead:
```
ZEND_MALIAS(pmmp_thread_Thread, shutdown, join, arginfo_class_pmmp_thread_Worker_shutdown,
ZEND_ACC_PUBLIC)
```
### PHP Version
8.2.6
### Operating System
Windows 11