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

Twig: Missing template in WSL when bundle is symlinked #2402

Open
jannes-io opened this issue Sep 21, 2024 · 0 comments
Open

Twig: Missing template in WSL when bundle is symlinked #2402

jannes-io opened this issue Sep 21, 2024 · 0 comments

Comments

@jannes-io
Copy link

jannes-io commented Sep 21, 2024

To reproduce:

Install a Symfony bundle using composer from a local repository.

    "repositories": [
        {
            "type": "path",
            "url": "../<some bundle cloned from git>"
        },
	],

Now the bundle gets symlinked into vendor, the paths are added to Symfony > Twig / Template correctly. But the inspection is showing that the template can't be found.

In Windows, this works properly, in WSL, it gives an error. Even when manually adding the path to /vendor/<package>/templates it does not show up, no matter if I add it as ADD_PATH, BUNDLE, or anything. It seems like the inspection just doesn't follow symlinks or look outside of the project directory.

Bundles that are not installed using symlink do work properly.

Real world:
image
image

doctrine, web profiler,... work as expected, the highlighted ones are symlinked and do not work. The path is also wrong, the path should be /home/developer/forumify-platform/templates, it added the vendor dir to it which does not exist (path in composer.json is not respected)

When trying to enter the full path (\\wsl.localhost\Ubuntu\home\developer\...) it crashes the template settings (blank table) and I have to reset the configuration.

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

1 participant