No composer.json file found, automatic namespace generation failed
xenogenesi opened this issue · 3 comments
xenogenesi commented
Probably the problem is that the php project is in a subdirectory and not in the root directory.
Edit: it's strange because other commands to import classes work without problems.
mkremnev commented
I changed in the extension method of the Resolve.js file to workspace.findFiles ('**/composer.json') and it worked for me.
xfudox commented
I got the same problem, and I too have composer.json
file in subdirectory.
Any update on this? Is there an official fix other than manually editing Resolve.js
?
mathieumuller commented
As a workaround you can create a composer.json file in the project root folder with the following (adapt to your project structure and autoload policy and add to ignored files) :
{
"autoload": {
"psr-4": {
"App\\": "app/src/"
}
}
}