Skip to content
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

No composer.json file found, automatic namespace generation failed #77

Open
xenogenesi opened this issue Mar 9, 2020 · 3 comments
Open

Comments

@xenogenesi
Copy link

xenogenesi commented Mar 9, 2020

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
Copy link

I changed in the extension method of the Resolve.js file to workspace.findFiles ('**/composer.json') and it worked for me.

@xfudox
Copy link

xfudox commented Mar 30, 2021

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
Copy link

mathieumuller commented Jul 25, 2021

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/"
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants