You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "rarila (via GitHub)" <gi...@apache.org> on 2023/09/23 07:08:51 UTC

[GitHub] [netbeans] rarila commented on issue #6465: Formatting of "uses" broken

rarila commented on issue #6465:
URL: https://github.com/apache/netbeans/issues/6465#issuecomment-1732237403

   @junichi11
   Sorry, I wasn’t clear. The problem occurs when using with ``Fix Imports``.
   
   Ok, an step-by-step example (same effect with other settings, they are simply ignored):
   
   ### Settings and code:
   
   ``Options/Editor/Formatting/PHP/Uses`` = "[×] Put in PSR-12 Order"
   ``Options/Editor/Formatting/PHP/Blank_Lines/Between_Use_Types`` = "1"
   
   ```
   <?php
   
   namespace MyProject;
   
   use Vendor\Package\Type;
   use Vendor\Package\Type2;
   
   use function Vendor\Package\fnc;
   
   use const Vendor\Package\CONSTANT;
   ```
   
   ### Action:
   
   Execute ``Fix Imports …`` command
   
   ### Expected result:
   
   ```
   <?php
   
   namespace MyProject;
   
   use Vendor\Package\Type;
   use Vendor\Package\Type2;
   
   use function Vendor\Package\fnc;
   
   use const Vendor\Package\CONSTANT;
   ```
   
   
   ### Actual result:
   
   ```
   <?php
   
   namespace MyProject;
   
   use Vendor\Package\Type;
   use Vendor\Package\Type2;
   use const Vendor\Package\CONSTANT;
   use function Vendor\Package\fnc;
   ```
   No blank lines, no PSR-12 order
   


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