title: Symfony error: Class 'Symfony\Component\HttpKernel\Kernel' not found
body: <p>After upgrading from Symfony 3.1 to 3.2 I get this error message : </p>
  
  <blockquote>
    <p>Fatal error:  Class 'Symfony\Component\HttpKernel\Kernel' not
    found in /var/www/html/HeliosBlog/app/AppKernel.php on line 6</p>
  </blockquote>
  
  <p>Here's what my app/autoload.php looks like:</p>
  
  <pre><code>&lt;?php
  
  use Doctrine\Common\Annotations\AnnotationRegistry;
  
  if (!$loader = @include __DIR__.'/../vendor/autoload.php') {
  
      $message = &lt;&lt;&lt; EOF
  
  EOF;
  
      if (PHP_SAPI === 'cli') {
          $message = strip_tags($message);
      }
  
      die($message);
  }
  
  // intl
  if (!function_exists('intl_get_error_code')) {
      require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
  
      $loader-&gt;add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
  }
  
  AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
  
  return $loader;
  </code></pre>
  
  <p>Here's what my app_dev.php file looks like:</p>
  
  <pre><code>&lt;?php
  
  use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\Debug\Debug;
  
  if (isset($_SERVER['HTTP_CLIENT_IP'])
      || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
      || !(in_array(@$_SERVER['REMOTE_ADDR'], array(
              '127.0.0.1',
              'fe80::1', '::1')) || php_sapi_name() === 'cli-server')
  ) {
      header('HTTP/1.0 403 Forbidden');
      exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
  }
  
  $loader = require __DIR__.'/../app/autoload.php';
  Debug::enable();
  
  require_once __DIR__.'/../app/AppKernel.php';
  
  $kernel = new AppKernel('dev', true);
  //$kernel-&gt;loadClassCache();
  $request = Request::createFromGlobals();
  $response = $kernel-&gt;handle($request);
  $response-&gt;send();
  $kernel-&gt;terminate($request, $response);
  </code></pre>
  
  <p>And here's what my AppKernel.php looks like:</p>
  
  <pre><code>&lt;?php
  
  use Symfony\Component\HttpKernel\Kernel;
  use Symfony\Component\Config\Loader\LoaderInterface;
  
  class AppKernel extends Kernel
  {
  
      public function registerBundles()
      {
          $bundles = array(
              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 Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
              new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
              new JMS\AopBundle\JMSAopBundle(),
              new JMS\DiExtraBundle\JMSDiExtraBundle($this),
              new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
              new JMS\SerializerBundle\JMSSerializerBundle(),
              new Helios\BlogBundle\HeliosBlogBundle(),
              new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
              new Helios\UserBundle\HeliosUserBundle(),
              new FOS\UserBundle\FOSUserBundle(),
              new FOS\ElasticaBundle\FOSElasticaBundle(),
              new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(),
              new Helios\ManagerBundle\HeliosManagerBundle(),
              new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
              //new Avalanche\Bundle\ImagineBundle\AvalancheImagineBundle(),
              new Oneup\UploaderBundle\OneupUploaderBundle(),
              new Gregwar\CaptchaBundle\GregwarCaptchaBundle(),
              new Sonata\AdminBundle\SonataAdminBundle(),
              new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
              new Sonata\BlockBundle\SonataBlockBundle(),
              new Sonata\CoreBundle\SonataCoreBundle(),
              new Knp\Bundle\MenuBundle\KnpMenuBundle(),
              new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
              new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
          );
  
          if (in_array($this-&gt;getEnvironment(), array('dev', 'test'))) {
              $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
              $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
              $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  
              $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
              $bundles[] = new CoreSphere\ConsoleBundle\CoreSphereConsoleBundle();
          }
  
          return $bundles;
      }
  
      public function registerContainerConfiguration(LoaderInterface $loader)
      {
          $loader-&gt;load(__DIR__.'/config/config_'.$this-&gt;getEnvironment().'.yml');
      }
  }
  </code></pre>
  
  <p>Already tried removing the vendor folder and doing a composer install.</p>
  
  <p>Any ideas?</p>