Skip to content

Commit

Permalink
removed the autoloader map feature
Browse files Browse the repository at this point in the history
This feature added complexity to the framework but wasn't used in the core anyway.
You can still use the Map class loader  in your application though. But most of the time, using the APC
autoloader is just better.
  • Loading branch information
fabpot committed Apr 28, 2011
1 parent 509f3dd commit 3fe385e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 140 deletions.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
Expand Up @@ -18,7 +18,6 @@
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;
Expand All @@ -29,7 +28,6 @@
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\ClassLoader\ClassCollectionLoader;
use Symfony\Component\ClassLoader\MapFileClassLoader;

/**
* Bundle.
Expand All @@ -55,11 +53,6 @@ public function boot()
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)
Expand All @@ -75,7 +68,6 @@ public function build(ContainerBuilder $container)
$container->addCompilerPass(new AddConstraintValidatorsPass());
$container->addCompilerPass(new FormPass());
$container->addCompilerPass(new AddClassesToCachePass());
$container->addCompilerPass(new AddClassesToAutoloadMapPass());
$container->addCompilerPass(new TranslatorPass());
$container->addCompilerPass(new AddCacheWarmerPass());

Expand Down
Expand Up @@ -10,7 +10,6 @@
<parameter key="error_handler.class">Symfony\Component\HttpKernel\Debug\ErrorHandler</parameter>
<parameter key="filesystem.class">Symfony\Component\HttpKernel\Util\Filesystem</parameter>
<parameter key="cache_warmer.class">Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate</parameter>
<parameter key="cache_warmer.autoloader_map.class">Symfony\Bundle\FrameworkBundle\CacheWarmer\ClassMapCacheWarmer</parameter>
<parameter key="file_locator.class">Symfony\Component\HttpKernel\Config\FileLocator</parameter>
</parameters>

Expand All @@ -33,11 +32,6 @@
<argument type="collection" />
</service>

<service id="cache_warmer.autoload_map" class="%cache_warmer.autoloader_map.class%" public="false">
<tag name="kernel.cache_warmer" />
<argument type="service" id="service_container" />
</service>

<!--
If you want to change the Request class, modify the code in
your front controller (app.php) so that it passes an instance of
Expand Down
21 changes: 0 additions & 21 deletions src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php
Expand Up @@ -23,7 +23,6 @@
abstract class Extension implements ExtensionInterface
{
private $classes = array();
private $classMap = array();

/**
* Gets the classes to cache.
Expand All @@ -45,26 +44,6 @@ public function addClassesToCompile(array $classes)
$this->classes = array_merge($this->classes, $classes);
}

/**
* Gets the autoload class map.
*
* @return array An array of classes
*/
public function getAutoloadClassMap()
{
return $this->classMap;
}

/**
* Adds classes to the autoload class map.
*
* @param array $classes An array of classes
*/
public function addClassesToAutoloadMap(array $classes)
{
$this->classMap = array_merge($this->classMap, $classes);
}

/**
* Returns the base path for the XSD files.
*
Expand Down

0 comments on commit 3fe385e

Please sign in to comment.