Skip to content

Feature Request : Add path prefix for dev:urn:generate #7945

@kanduvisla

Description

@kanduvisla

So I recently 'discovered' that you can set the proper urn's for your IDE with the command bin/magento dev:urn:generate, but if you're running your Magento development environment in a VM (like I am) the paths generated do not match with the path on your development machine.

For example, in my VM, Magento 2 is installed in /var/www/magento, and /var/www is mounted on my local directory /Users/giel/PhpStormProjects/ProjectName.

So when I run bin/magento dev:urn:generate ../misc.xml it generates all mappings to /var/www/magento instead of /Users/giel/PhpStormProjects/ProjectName, rendering this feature useless if you're running it in a VM.

So there are 2 options here:

  • I can edit misc.xml and find and replace all the paths. Or:
  • We can add an extra option to the CLI command, --prefix for example.

If we go for option 2, we can do something like:

bin/magento dev:urn:generate --prefix="/Users/giel/PhpStormProjects/ProjectName/" ../misc.xml

Would this be a nice attribution to this function? If so, I wouldn't mind spending some time creating it and sending a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions