cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Feature request from kanduvisla, posted on GitHub Dec 23, 2016

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.