Deploying Files with a Different Extension
I have some files in Git. Those files have been cloned locally in PHPStorm. The problem is that when these files are deployed to the server (not in PHPStorm), .php files have their extension changed. For example, `example.php` would become `example.an` when deployed. My question is, how do I map the locally cloned `example.php` to the deployed `example.an` in PHPStorm? And no, changing file extensions on all deployments is not an option.
Please sign in to leave a comment.
Hi there,
You may create custom mapping in Deployment settings (Mappings tab) -- seems to work fine in 2017.1.1 version.
Obviously, this has to be done on per file basis (one mapping per file).
For me, when viewing "Settings,Execution, Deployment > Deployment" and then selecting the Mappings tab, and then clicking on "Add another mapping", I can only select a directory for custom mappings, not individual files. Is there another setting somewhere to enable file level deployment mapping, or is there another Deployment settings page entirely that I missed? and I am running 2017.1.1.
>For me, when viewing "Settings,Execution, Deployment > Deployment" and then selecting the Mappings tab, and then clicking on "Add another mapping", I can only select a directory for custom mappings, not individual files.
That's correct -- I see the same
>Is there another setting somewhere to enable file level deployment mapping, or is there another Deployment settings page entirely that I missed?
Nope. But you can easily type the file name part manually.
Possible explanation: such need to map individual files happens very rarely -- almost always you want to map just folders.
P.S.
You may file a ticket at Issue Tracker if you think that ability to select not only folder but files as well is a missing feature/bug.
This solved my problem, Andriy Bazanov. Manually creating mappings for each file will be tedious, but thankfully I'll only have to do it once. I don't think this is common enough to ask for a feature.