in prod mode, everything is working with this configuration (app.php):
<?php
use Symfony\Component\HttpFoundation\Request;
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../var/bootstrap.php.cache';
$kernel = new AppKernel('prod', true);
$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);
When i turn "$kernel = new AppKernel('prod', false);" to false, the display does not work fully.
This is my config.yml (for assetic):
# ASSETIC BUNDLE
assetic:
debug: '%kernel.debug%'
use_controller: '%kernel.debug%'
filters:
cssrewrite: ~
I always do this:
- pbc cache:clear --env=prod --no-debug
- pbc assetic:dump --env=prod --no-debug
(alias pbc for php bin/console)
If I inspect the code, i can see all .css are not dump:
<head>
....
<link rel="stylesheet" href="/css/compiled/app.css">
<link rel="stylesheet" href="/css/compiled/user.css">
....
</head>
Because when AppKernel is set to true, i can see that:
<head>
.....
<link rel="stylesheet" href="/css/compiled/app_bootstrap.min_1.css">
<link rel="stylesheet" href="/css/compiled/app_dataTables.bootstrap.min_2.css">
<link rel="stylesheet" href="/css/compiled/app_font-awesome_3.css">
<link rel="stylesheet" href="/css/compiled/app_custom_front_4.css">
<link rel="stylesheet" href="/css/compiled/app_header_5.css">
<link rel="stylesheet" href="/css/compiled/app_footer_6.css">
<link rel="stylesheet" href="/css/compiled/user_user_1.css">
<link rel="stylesheet" href="/css/compiled/user_select2.min_2.css">
.....
</head>
I know that i can't set AppKernel to true in prod mode, so it's very important to fix this problem. I read a lot of topic but i don't find the solution...
Any idea?
Thanks