File tree 5 files changed +28
-12
lines changed
Bundle/FrameworkBundle/Tests/Controller
Security/Acl/Resources/bin 5 files changed +28
-12
lines changed Original file line number Diff line number Diff line change 1
1
UPGRADE FROM 2.x to 3.0
2
2
=======================
3
3
4
+ ### ClassLoader
5
+
6
+ * The ` UniversalClassLoader ` class has been removed in favor of ` ClassLoader ` . The only difference is that some method
7
+ names are different:
8
+
9
+ * `registerNamespaces()` -> `addPrefixes()`
10
+ * `registerPrefixes()` -> `addPrefixes()`
11
+ * `registerNamespaces()` -> `addPrefix()`
12
+ * `registerPrefixes()` -> `addPrefix()`
13
+ * `getNamespaces()` -> `getPrefixes()`
14
+ * `getNamespaceFallbacks()` -> `getFallbackDirs()`
15
+ * `getPrefixFallbacks()` -> `getFallbackDirs()`
16
+
17
+ * The ` DebugUniversalClassLoader ` class has been removed in favor of
18
+ ` DebugClassLoader ` . The difference is that the constructor now takes a
19
+ loader to wrap.
20
+
4
21
### HttpKernel
5
22
6
23
* The ` Symfony\Component\HttpKernel\Log\LoggerInterface ` has been removed in
Original file line number Diff line number Diff line change 13
13
14
14
use Symfony \Bundle \FrameworkBundle \Tests \TestCase ;
15
15
use Symfony \Bundle \FrameworkBundle \Controller \ControllerNameParser ;
16
- use Symfony \Component \ClassLoader \UniversalClassLoader ;
16
+ use Symfony \Component \ClassLoader \ClassLoader ;
17
17
18
18
class ControllerNameParserTest extends TestCase
19
19
{
20
20
protected $ loader ;
21
21
22
22
protected function setUp ()
23
23
{
24
- $ this ->loader = new UniversalClassLoader ();
25
- $ this ->loader ->registerNamespaces (array (
24
+ $ this ->loader = new ClassLoader ();
25
+ $ this ->loader ->addPrefixes (array (
26
26
'TestBundle ' => __DIR__ .'/../Fixtures ' ,
27
27
'TestApplication ' => __DIR__ .'/../Fixtures ' ,
28
28
));
Original file line number Diff line number Diff line change @@ -79,18 +79,17 @@ protected function getScript($request)
79
79
$ kernel = str_replace ("' " , "\\' " , serialize ($ this ->kernel ));
80
80
$ request = str_replace ("' " , "\\' " , serialize ($ request ));
81
81
82
- $ r = new \ReflectionClass ('\\Symfony \\Component \\ClassLoader \\UniversalClassLoader ' );
82
+ $ r = new \ReflectionClass ('\\Symfony \\Component \\ClassLoader \\ClassLoader ' );
83
83
$ requirePath = str_replace ("' " , "\\' " , $ r ->getFileName ());
84
-
85
84
$ symfonyPath = str_replace ("' " , "\\' " , realpath (__DIR__ .'/../../.. ' ));
86
85
87
86
return <<<EOF
88
87
<?php
89
88
90
89
require_once ' $ requirePath';
91
90
92
- \$loader = new Symfony\Component\ClassLoader\UniversalClassLoader ();
93
- \$loader->registerNamespaces(array( 'Symfony' => ' $ symfonyPath') );
91
+ \$loader = new Symfony\Component\ClassLoader\ClassLoader ();
92
+ \$loader->addPrefix( 'Symfony', ' $ symfonyPath');
94
93
\$loader->register();
95
94
96
95
\$kernel = unserialize(' $ kernel');
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function testGetScript()
50
50
$ this ->markTestSkipped ('The "Process" component is not available ' );
51
51
}
52
52
53
- if (!class_exists ('Symfony\Component\ClassLoader\UniversalClassLoader ' )) {
53
+ if (!class_exists ('Symfony\Component\ClassLoader\ClassLoader ' )) {
54
54
$ this ->markTestSkipped ('The "ClassLoader" component is not available ' );
55
55
}
56
56
Original file line number Diff line number Diff line change 9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
- require_once __DIR__ .'/../../../../ClassLoader/UniversalClassLoader .php ' ;
12
+ require_once __DIR__ .'/../../../../ClassLoader/ClassLoader .php ' ;
13
13
14
- use Symfony \Component \ClassLoader \UniversalClassLoader ;
14
+ use Symfony \Component \ClassLoader \ClassLoader ;
15
15
use Symfony \Component \Finder \Finder ;
16
16
use Symfony \Component \Security \Acl \Dbal \Schema ;
17
17
18
- $ loader = new UniversalClassLoader ();
19
- $ loader ->registerNamespaces (array (
18
+ $ loader = new ClassLoader ();
19
+ $ loader ->addPrefixes (array (
20
20
'Symfony ' => __DIR__ .'/../../../../../.. ' ,
21
21
'Doctrine \\Common ' => __DIR__ .'/../../../../../../../vendor/doctrine-common/lib ' ,
22
22
'Doctrine \\DBAL \\Migrations ' => __DIR__ .'/../../../../../../../vendor/doctrine-migrations/lib ' ,
You can’t perform that action at this time.
0 commit comments