How to tell Eclipse PDT where the root path is for namespace validation?

416 views Asked by At

The folder for my PHP Eclipse project has a folder "src/" in the root path and inside it is a tree of the PHP files.

I have the following warning for all of my php files:

The declared namespace "" does not match the expected namespace

The issue is that the validator is expecting all namespaces to start with the top level "src/" folder when this is the path of where all of the source code of the project begins.

Eclipse Java projects allow specifying where the source folder is but I don't see an option for this with the PHP project.

Am I forced to place my source tree starting at the project root to satisfy the validator?

I am using Eclipse 2020-12 (4.18).

0

There are 0 answers