PhpStorm - Advantages of Editing Deployed Files Directly vs Downloading and Syncing

后端 未结 1 804
星月不相逢
星月不相逢 2020-11-30 14:56

I use PhpStorm remotely and on-site. I currently have the project downloaded at both locations and sync with the deployed server. I learned, however, that PhpStorm has the

相关标签:
1条回答
  • 2020-11-30 15:36

    If I edit files directly on the deployed server, would any PhpStorm functionality be lost?

    Yes. To name a few:

    • IDE cannot index files that are not in the project and therefore cannot provide any code completion help for classes/functions/etc that defined on remote only files;
    • True project-wide search is not possible (as it works with local files only). This means that you may do find/replace on local files but any remote-only matches will simply not be found;
    • Because there is no indexing ... any sort of refactoring can only be applied to local files only .. which may lead to the fact that (for example) class name is changed only in half of the places;
    • Local History (simple built-in VCS which remembers all your edits between file saves) is not available.

    Remote-only editing can be practical only if you need to make some quick changes (e.g. fix typo; change some config value) or where no cross-referencing is required (e.g. you know for sure that file with such name exists at that location; or class has such method with those parameters etc). With the same success you can replace PhpStorm IDE with much faster Notepad++/Sublime or any other text editor with FTP/SFTP support.

    0 讨论(0)
提交回复
热议问题