eclipse-pdt / pdt

PHP Development Tools project (PDT)
https://eclipse.org/pdt
Eclipse Public License 2.0
188 stars 46 forks source link

"use" statement inserted automatically before declare(strict_types) #242

Open mlocati opened 1 year ago

mlocati commented 1 year ago

Let's assume we are in this situation:

immagine

If we choose one of the suggested classes, PDT inserts the use statement before declare(strict_types=1);:

immagine

So, when PHP parses this file, it displays this error:

Fatal error: strict_types declaration must be the very first statement in the script

PDT should add use statements after the declare statement.