Hi there, I work almost all the time with remote projects so this is how I setup them (step by step):
- Select "Create new project from existing files"
- Select "Web server is on remote host, files are accesible via FTP/SFTP/FTPS"
- Setup name and path in local PC
- Select a predefined SFTP server
- Set project root (top as you may notice) and excludes
- Setup for download but exclude from indexing "vendor"
- Leave blank this step because that URL shown there is the root for VH so no need additional files or path
That's how I am setting up a remote project. This has worked for me until now but also it's giving me some headaches. Why?
If I download the vendor folder but exclude from indexing (which takes a large ammount of time sometimes) then my application won't recognize (it says undefined namespace xxxxx as shown in red on the pic below) any internal classes from Symfony and any other bundle I was using on my project setup by composer.json file.
- In the other side if I download the vendor folder and allow it to index that fix the issue previous mentioned but create a new one, any time I run composer update on the server I need to synchronize all again and sometimes I got unnecesary files on vendor folder (because they was deleted from previous bundles releases and IDE set them to upload to remote folder) and other times I got files overwrited even deleted (for the same cause)
I have seen this in my project setup but don't know how to get this done:
So there is a safety way by mapping on remote side but without need to sync all the time the vendor folder? Which is the best practice for this in Symfony projects?