Skip to content

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

Open
@jannes-io

Description

@jannes-io

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions