Local change files at remote php script execution

Answered

Hi,
I'm developing on Symfony 3.4 using PHPStorm.
Locally on the PC installed only IDE (without the PHP execution file).
Development doing on remote server with LAMP.
I have autodeploy files on remote server. Also configured remote PHP execution via ssh.
I often use Symfony cli to create Symfony objects (for example "php bin / console generate: controller").
But when this command is executed, files are created and modified on the remote server. But the IDE concept assumes that local files are main.
How do I configure PHPStrom to execute this command locally via remote PHP to change file local ? (Then I will make deploy on remote server).
I do not want to install local PHP on my PC, but I want run Symfony cli to change local files, that then would not have to update the local files from a remote server.


Thanks.

2 comments

Hi there,

>How do I configure PHPStrom to execute this command locally via remote PHP to change file local ?

You cannot -- it simply does not work like that. If it's remote interpreter .. then it (obviously) gets executed on remote system (be it VM/physical server or docker container etc).

If you wish to change local files then you will have to have local PHP (since you wish to execute PHP-based tool).

1

Please sign in to leave a comment.