This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Justin Hileman 0ccc9805f5 Fix UniversalClassLoader issues with leading slashes.
This fixes a bug in UniversalClassLoader when attempting to autoload class names with leading slashes:

    $namespacedClass = "\\Foo\\Bar";
    $pearlikeClass   = "\\Foo_Bar";

    $namespaced = new $namespacedClass();
    $pearlike   = new $pearlikeClass();

`UniversalClassLoader::loadClass()` was unable to load PEAR-like classes with leading slashes because it found the slash and assumed that the requested class was namespaced. It was unable to load namespaced classes with leading slashes because it would look them up in the autoloader's registered namespaces, and was unable to match '\Foo' to 'Foo'. One (ugly) workaround for the namespaced classes was to register all namespaces twice:

    $loader->registerNamespaces(array(
        'Foo'  => __DIR__ . '/lib',
        '\Foo' => __DIR__ . '/lib',
    ));

But that's not very pretty, nor does it solve the bug with PEAR-like classes. Stripping the leading slash before trying to autoload allows UniversalClassLoader to load both namespaced and PEAR-like classes.
2010-10-20 14:20:12 +02:00
..
BrowserKit Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Console Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
CssSelector [CssSelector] Fixed typo 2010-10-19 17:20:34 +02:00
DependencyInjection [DependencyInjection] XmlFileLoader should allow "factory-service" attribute without "class" for <service> 2010-10-19 21:10:07 +02:00
DomCrawler Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
EventDispatcher Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Finder Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Form Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
HttpFoundation Fix UniversalClassLoader issues with leading slashes. 2010-10-20 14:20:12 +02:00
HttpKernel made form login configurable 2010-10-20 11:42:19 +02:00
OutputEscaper Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Process Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Routing Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Security [Security] Fixed typo 2010-10-20 07:07:54 +02:00
Templating Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Translation Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Validator [Validator] removed ftp and ftps from default url protocols 2010-10-18 16:57:07 +02:00
Yaml Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00