[PHP] Auto formatting does not handle use ordering #6717
Labels
kind:bug
Bug report or fix
needs:triage
Requires attention from one of the committers
PHP
[ci] enable extra PHP tests (php/php.editor)
Apache NetBeans version
Apache NetBeans 20 release candidate
What happened
https://www.php-fig.org/per/coding-style/#3-declare-statements-namespace-and-import-statements
When using Source > Format (
alt+shift+F
) NetBeans correctly detect the blocks and separates them, but the order is not enforced. Only Source > Fix Imports (ctrl+shift+I
) fixes the order.Uses placed after a class are breaking things even further.
ctrl+shift+I
This additionally breaks the "singe new-line at the end of file" rule, leaving 2 new lines.
How to reproduce
No response
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 11
JDK
21.0.1
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: