[ https://issues.apache.org/jira/browse/NETBEANS-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17239133#comment-17239133 ]
Jayce commented on NETBEANS-4978: --------------------------------- Just got this one: Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script Sometimes, fix command moves useXXXX before namespace. I guess it's the same problem So make sure on Fix command order is respected: 1) declare(strict_types=1); 2) namespace XXX 3) use yyy Thanks ! > PHP Menu Source->Fix uses break code > ------------------------------------ > > Key: NETBEANS-4978 > URL: https://issues.apache.org/jira/browse/NETBEANS-4978 > Project: NetBeans > Issue Type: Improvement > Components: php - Editor > Affects Versions: 12.0 > Reporter: Jayce > Assignee: Junichi Yamamoto > Priority: Minor > Attachments: 01BeforeFixUses.png, 02AfterFixUses.png, BugClass.php, > BugScreencast.mov > > > Using "Fix Uses" (Source menu) break code by moving "use \Package\To\Use;" > before "declare(strict_types=1);" > It does not happen if a use line is already present in the source code (at > the correct position). > declare(strict_types=1); must always be the first line. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists