You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/08/22 11:35:55 UTC

[GitHub] [netbeans] szymach opened a new issue, #4527: Importing global PHP functions

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

   ### Description
   
   Hello!
   
   Right now only functions from other namespaces can be imported (and `count` for some reason) with the `use function` directive. All other display the `cannot be resolved` in the `Fix imports in Current Namespace` window. 
   
   ### Use case/motivation
   
   I have found the `use function` to be far more elegant than the prefixed syntax, but I have to do it manually. Being able to import them automatically like the class names would save a lot of tedious minor work.
   
   ### 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: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Importing global PHP functions [netbeans]

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on issue #4527:
URL: https://github.com/apache/netbeans/issues/4527#issuecomment-1948697529

   > should I also include how it should happen in the IDE
   
   Yes, well, it would be nice if you write your exact steps, an actual result, and an expected result.
   
   1. Copy & paste the example code
   2. ...
   3. ...
   
   Actual result:
   
   ...
   
   Expected result:
   
   ...
   
   BTW, we are going to add the "Auto Import" feature in NetBeans 22 (https://github.com/apache/netbeans/pull/7027)
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Importing global PHP functions [netbeans]

Posted by "szymach (via GitHub)" <gi...@apache.org>.
szymach commented on issue #4527:
URL: https://github.com/apache/netbeans/issues/4527#issuecomment-1948618773

   Does this explain my meaning, or should I also include how it should happen in the IDE?
   
   ```php
   
   namespace Demo;
   
   use function in_array;
   
   class someClass 
   {
       public function someMethod(string $key): bool
       {
           return in_array($key, ['a value'], true);
       }
   }
   ```
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Importing global PHP functions [netbeans]

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on issue #4527:
URL: https://github.com/apache/netbeans/issues/4527#issuecomment-1943113896

   Could you also write an example code?


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists