diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ClassMapCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ClassMapCacheWarmer.php deleted file mode 100644 index c6671e2201..0000000000 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ClassMapCacheWarmer.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmer; -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * Generates an autoload class map cache. - * - * @author Fabien Potencier - */ -class ClassMapCacheWarmer extends CacheWarmer -{ - protected $container; - - /** - * Constructor. - * - * @param ContainerInterface $container The container - */ - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - /** - * Warms up the cache. - * - * @param string $cacheDir The cache directory - */ - public function warmUp($cacheDir) - { - if (!$this->container->hasParameter('kernel.autoload_classes')) { - return; - } - - $classes = array(); - foreach ($this->container->getParameter('kernel.autoload_classes') as $class) { - $r = new \ReflectionClass($class); - - $classes[$class] = $r->getFilename(); - } - - $this->writeCacheFile($cacheDir.'/autoload.php', sprintf(' - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -/** - * Sets the class map for the autoloader. - * - * @author Fabien Potencier - */ -class AddClassesToAutoloadMapPass implements CompilerPassInterface -{ - /** - * {@inheritDoc} - */ - public function process(ContainerBuilder $container) - { - $classes = array(); - foreach ($container->getExtensions() as $extension) { - if ($extension instanceof Extension) { - $classes = array_merge($classes, $extension->getAutoloadClassMap()); - } - } - - $container->setParameter('kernel.autoload_classes', array_unique($classes)); - } -} diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php index 9a06ff198e..cdda39ecfc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php @@ -18,7 +18,6 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelLi use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RoutingResolverPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddClassesToCachePass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddClassesToAutoloadMapPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslatorPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheWarmerPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass; @@ -29,7 +28,6 @@ use Symfony\Component\DependencyInjection\Scope; use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\ClassLoader\ClassCollectionLoader; -use Symfony\Component\ClassLoader\MapFileClassLoader; /** * Bundle. @@ -55,11 +53,6 @@ class FrameworkBundle extends Bundle if ($this->container->has('error_handler')) { $this->container->get('error_handler'); } - - if (file_exists($this->container->getParameter('kernel.cache_dir').'/autoload.php')) { - $classloader = new MapFileClassLoader($this->container->getParameter('kernel.cache_dir').'/autoload.php'); - $classloader->register(true); - } } public function build(ContainerBuilder $container) @@ -75,7 +68,6 @@ class FrameworkBundle extends Bundle $container->addCompilerPass(new AddConstraintValidatorsPass()); $container->addCompilerPass(new FormPass()); $container->addCompilerPass(new AddClassesToCachePass()); - $container->addCompilerPass(new AddClassesToAutoloadMapPass()); $container->addCompilerPass(new TranslatorPass()); $container->addCompilerPass(new AddCacheWarmerPass()); diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml index 7289348684..84423f66bc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml @@ -10,7 +10,6 @@ Symfony\Component\HttpKernel\Debug\ErrorHandler Symfony\Component\HttpKernel\Util\Filesystem Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate - Symfony\Bundle\FrameworkBundle\CacheWarmer\ClassMapCacheWarmer Symfony\Component\HttpKernel\Config\FileLocator @@ -33,11 +32,6 @@ - - - - -