I loaded all files on my PROD env, removed all files and subdirectiories from /var/cache
directory and got blank screen.
After adding
ini_set("error_reporting", E_ALL);
ini_set("display_errors", "1");
to the app.php
file, i got this error:
Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\InvalidArgumentException' with message 'There is no extension able to load the configuration for "web_profiler"
Could anyone tell my why the web profiler is even executed on the PROD environment? It should be used only on TEST or DEV, I think. I can't even clear PROD cache on my localhost server because of this error.
Oh, and in app.php
file I got $kernel = new AppKernel('prod', false);
, so the web profiler shouldn't be used...
UPDATE
AppKernel.php
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JavierEguiluz\Bundle\EasyAdminBundle\EasyAdminBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
new A2lix\TranslationFormBundle\A2lixTranslationFormBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new JMS\DiExtraBundle\JMSDiExtraBundle($this),
new JMS\AopBundle\JMSAopBundle(),
new JMS\TranslationBundle\JMSTranslationBundle(),
// my bundles here
];
if(in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
public function getRootDir()
{
return __DIR__;
}
public function getCacheDir()
{
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}
public function getLogDir()
{
return dirname(__DIR__).'/var/logs';
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}