Eugene-Melbourne opened a new issue, #6162:
URL: https://github.com/apache/netbeans/issues/6162
### Apache NetBeans version
Apache NetBeans 18
### What happened
in PHP type-hinting class property with "?" does not work with "use"
section, but if the class property typed with "|null" it works fine
### How to reproduce
We would need 2 files:
`MyClass.php`
<?php
namespace App\Helpers;
class MyClass {}
`MyClass2.php`
<?php
namespace App\Helpers;
use App\Helpers\MyClass;
/**
* @property ?MyClass $a
*/
class MyClass2 {}
in the `MyClass2.php` the line `use App\Helpers\MyClass;` is now underlined
with a red line and if you press `shit `+ `ctrl `+`i` - it will be deleted.
The expected behavior would be to not deleting it and not underlining it.
the expected behavior would be presented if the file `MyClass2.php`
will look like this
```
<?php
namespace App\Helpers;
use App\Helpers\MyClass;
/**
* @property MyClass|null $a
*/
class MyClass2
{}
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 10 version 10.0 running on amd64; UTF-8; en_AU (nb)
### JDK
19.0.1; Java HotSpot(TM) 64-Bit Server VM 19.0.1+10-21
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists