zeleznypa opened a new issue, #4612:
URL: https://github.com/apache/netbeans/issues/4612

   ### Description
   
   The PHP 8 introduced generated class properties defined in constructor like:
   
   ```php
   class Foo {
       public function __construct(
           public Bar $bar,
           protected Baz $baz
       ){}
   
       protected function doSomething(): void
       {
           $this->bar->magic($this->baz->property);
       } 
   }
   ```
   
   instead of old one:
   
   ```php
   class Foo {
       public Bar $bar;
   
       protected Baz $baz
       public function __construct(Bar $bar, Baz $baz)
       {
           $this->bar = $bar;
           $this->baz = $baz;
       }
   
       protected function doSomething(): void
       {
           $this->bar->magic($this->baz->property);
       } 
   }
   ```
   
   ### Use case/motivation
   
   When the code is written old way,  the code suggestion in the `doSomething` 
method after I wrote `$this->bar` or `$this->baz` or when I press there the 
shortcut for the „Show code completion popup“ display the popup with available 
properties and methods.
   
   Unfortunately when the code is written in new way format, the popup is 
empty. 
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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

Reply via email to