Browse Source

[DependencyInjection] Fixed class load order

Fixed a bug that caused a "Cannot redeclare class Symfony\Components\Routing\RouterInterface"
fatal error when booting the Symfony kernel with a populated class cache.
Brandon Turner 15 years ago
parent
commit
8275034f5f

+ 1 - 1
src/Symfony/Framework/DependencyInjection/KernelExtension.php

@@ -82,8 +82,8 @@ class KernelExtension extends Extension
 
         if (!array_key_exists('compilation', $config)) {
             $classes = array(
-                'Symfony\\Components\\Routing\\Router',
                 'Symfony\\Components\\Routing\\RouterInterface',
+                'Symfony\\Components\\Routing\\Router',
                 'Symfony\\Components\\EventDispatcher\\Event',
                 'Symfony\\Components\\Routing\\Matcher\\UrlMatcherInterface',
                 'Symfony\\Components\\Routing\\Matcher\\UrlMatcher',

+ 1 - 1
src/Symfony/Framework/bootstrap.php

@@ -231,8 +231,8 @@ class KernelExtension extends Extension
 
         if (!array_key_exists('compilation', $config)) {
             $classes = array(
-                'Symfony\\Components\\Routing\\Router',
                 'Symfony\\Components\\Routing\\RouterInterface',
+                'Symfony\\Components\\Routing\\Router',
                 'Symfony\\Components\\EventDispatcher\\Event',
                 'Symfony\\Components\\Routing\\Matcher\\UrlMatcherInterface',
                 'Symfony\\Components\\Routing\\Matcher\\UrlMatcher',