File:
<?php
use Symfony\Component\HttpFoundation\Request;
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/../vendor/autoload.php';
if (PHP_VERSION_ID < 70000) {
include_once __DIR__.'/../var/bootstrap.php.cache';
}
$kernel = new AppKernel('prod', false);
if (PHP_VERSION_ID < 70000) {
$kernel->loadClassCache();
}
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Description:
I want to replace the line with the following content:
$kernel = new AppKernel('dev', true);
Instead of:
$kernel = new AppKernel('prod', false);
Main.yml file:
I'm trying to do this, but it does not work:
- name: Change to Symfony development enviroment for reflect the changes directly on the vagrant box
replace: dest=/vagrant/symfony-standard/web/app.php regexp='$kernel = new AppKernel('prod', false);' replace='$kernel = new AppKernel('dev', true);' backup=yes
Terminal:
TASK [symfony-standard : Change to Symfony development enviroment for reflect the changes directly on the vagrant box] ***
task path: /vagrant/playbooks/roles/symfony-standard/tasks/main.yml:49
ok: [default] => {"changed": false, "msg": ""}