First of all, I know that by the title this must be the 400th time this has been asked so I'll do my best to make this time different.
From some time now (more than 2 years..) our team has struggled a lot with setting up the environment for development. Our usual setup is to use Fedora24-25/Php-fpm/nginx/mariadb as the server. However, we are "required" to use Windows due to some programs that we have to use.
The current scenario
Right now, we are using VirtualBox/VMWare Workstation to virtualize Fedora and run our Symfony2 application there. The reason that I don't want to develop on Windows and then use the application in Fedora for production is due to compatibility issues that come when you have those 2 different OS.
One of the developers (me) is currently sharing via SMB the folder with all the applications to a mounted drive in Windows and using PHPStorm on Windows.. also telling Symfony2 to redirect cache/logs to another folder so that PhpStorm doesn't have to index that, for me so far this has worked the best so far..
The problem
The problem comes when we need to do the development.. right now we are working off Fedora with PhpStorm and that means that we are coding right from our VirtualBox.. so at this point for development purposes Windows (a.k.a the host) is pretty much useless... since we have both IDE and server running on the VM..
Having that said, it is pretty obvious that the problem comes with performance, we have pretty decent setups (HP Folio 9470m i7 16GB with an SSD).. but you can still feel the overhead and the slowness of doing the development on a VM... needless to say the fact that to go between Windows and Linux you have to be switching those windows and that is painful.
Problem #2: we have a 3 monitors setup, and the importance of this clarification will come in the next section.
What I have tried
With this approach, the best results I've got are using NFS. Normally, on a fresh installation of Symfony2 2.8, you get a response time of around 50ms on the profiler with php-opcache installed. However, using CIFS or SMB that increases drastically to around 500ms, with NFS I've been able to get around 60ms..BUT, there is a catch.. on Windows 10 pro there is no way to use NFS natively.. we would have to upgrade to Enterprise which at the moment is not a posibility.
Also, to be able to use this approach, I've had to redirect the cache/ and logs/ folder of symfony to another folder inside Fedora. Otherwise the I/O would kill that 60ms response time using a mounted folder.
With this approach, I've had exactly the same problem.. this is a very usual error that's going on around google with Symfony2 and docker slowness due to the volume being like a shared volume.. the same I/O performance issue..
I thought this was going to be the real deal... but it turns out that I experienced several issues.. I have been using linux for a long time so I know how to move around.. with Linux I had issues like:
a. I use 2 headphones...one for a Softphone and one (earbuds) to listen to music.. I wasn't able to get Fedora to always use one device for the softphone and one for other applications ...everytime I rebooted it went back.. (not important, can live without this)
b. Problem #2 specified above, I tried: Fedora, Linux Mint, and Ubuntu and in every distro I got a CRTC error when trying to setup my 3 displays..
c. No HeidiSQL support (shame, but I can live without this also)
as far as NGINX/PHP/Symfony2 everything worked properly
Same performance issues but this time with PhpStorm.. due to the fact that the files are over the network bla bla bla...
The Question
Basically, my definite question is, how is everyone doing to get a smooth development environment FROM windows using LINUX as a server and Symfony2/PHP as the language/framework?
I am pretty sure that I am not alone in this situation, and the more I research, the more the question remains..
Sorry for the long question!
Ok so this is what I came up with...
I have spent a whole day working on 4 applications (that's 4 PhpStorm instances opened) and it has been working just fine. The only time it is slow is when you first add the project that the IDE has to index everything.
I'll leave this here in case it helps anyone else or anyone else has any additional comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With