When I change the controller i do not see any changes. Only after two minutes automatically changes show on the website. I work using netbeans, run as remote web site(FTP). If I change the controller using directly FileZilla is the same. I use dev environment of course.
Now please don't tell me delete
var/cache folder
or use php app/console
cache:clear --env=prod --no-debug
This help once and provoke error from the image. And then i have to wait 2 minutes. After 2 minutes that error automatically disappear. My changes are visible but if i change the controller again, i have the same problem. Now again delete var/cache..wait two minutes, changes are visible. I can't work like that. Twig is ok, this reffering only php.
IMAGE
IMAGE
My web/app_dev.php
$loader = require __DIR__.'/../app/autoload.php';
Debug::enable();
$kernel = new AppKernel('dev', true);
//$kernel->loadClassCache();
Request::setTrustedHosts(array('^(.+\.)?finearts.klitom1.sldc.pl$'));
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Any ideas?
The most probable reason: You have a race condition rebuilding the cache on your server due to concurrent requests. Your hosting/server has limited cpu (php-fpm process) assigned to your site and a script timeout quite low that does not give enough time to rebuild completely the cache in one request.
If you want to keep doing live coding you should follow the following steps:
This is alot of work and it will slow down as you already mentioned but it will make it faster to get symfony up and running again.
My recommended steps: