-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The declared namespace Foo does not match src actually never matches with my projects. #76
Comments
If you enable composer support for your project (right click -> configure -> add composer support) it should read it correctly. But be careful, by default composer will try to rewrite your buildpath |
Yes indeed, it works now, thanks ! Still I'd add a few thoughts here:
|
Composer was separate community project that was transferred to us couple years ago. Some auto-discovery works during import/create project but not always. There is a plan to finally build one simple project creation/update wizard but after I finish new model without some DLTK limitations. As for now composer support have couple limitations:
As for now I personally use it mostly for correct "new class" , "validation" and buildpath refresh. I personally not use our powerful composer.json editor in my daily work ;) Any ideas welcome, but for now we have only 2 committers and a lot of work to do. |
Yeah I can imagine that 2 is often not enough ! Long time I didn't wrote any Java code, 10 years actually, maybe someday I'll try. I'm impressed with PDT quality knowing that you're not much people maintaining it, thanks for all you do. |
If this still not work and You project has such structure
Right click on |
Since 2020-06 version, the validation warning/notice such as
The declared namespace "App\Controller\Gestion" does not match the expected namespace "src\Controller\Gestion"
is very annoying.It's an extremely powerful feature and I would love to use it, yet it seems you cannot tell PDT which namespace to match in which folder (I might be wrong). I don't know how it deduces it, but it actually never matches real PSR-4 or PSR-0 configuration from my
composer.json
file, so considers that ALL my PHP files are at an invalid location.Version is:
I have quite a few addons installed, including PDT Extensions, I in that regard, it might be one of them messing up, but I'm not sure.
Linux guinevere 5.7.6-arch1-1 #1 SMP PREEMPT Thu, 25 Jun 2020 00:14:47 +0000 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: