Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 642c95a

Browse files
committed
added Universal* classes in the list of deprecated classes for 3.0
1 parent 7b8c0c1 commit 642c95a

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

UPGRADE-3.0.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
UPGRADE FROM 2.x to 3.0
22
=======================
33

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+
421
### HttpKernel
522

623
* The `Symfony\Component\HttpKernel\Log\LoggerInterface` has been removed in

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313

1414
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1515
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
16-
use Symfony\Component\ClassLoader\UniversalClassLoader;
16+
use Symfony\Component\ClassLoader\ClassLoader;
1717

1818
class ControllerNameParserTest extends TestCase
1919
{
2020
protected $loader;
2121

2222
protected function setUp()
2323
{
24-
$this->loader = new UniversalClassLoader();
25-
$this->loader->registerNamespaces(array(
24+
$this->loader = new ClassLoader();
25+
$this->loader->addPrefixes(array(
2626
'TestBundle' => __DIR__.'/../Fixtures',
2727
'TestApplication' => __DIR__.'/../Fixtures',
2828
));

src/Symfony/Component/HttpKernel/Client.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,17 @@ protected function getScript($request)
7979
$kernel = str_replace("'", "\\'", serialize($this->kernel));
8080
$request = str_replace("'", "\\'", serialize($request));
8181

82-
$r = new \ReflectionClass('\\Symfony\\Component\\ClassLoader\\UniversalClassLoader');
82+
$r = new \ReflectionClass('\\Symfony\\Component\\ClassLoader\\ClassLoader');
8383
$requirePath = str_replace("'", "\\'", $r->getFileName());
84-
8584
$symfonyPath = str_replace("'", "\\'", realpath(__DIR__.'/../../..'));
8685

8786
return <<<EOF
8887
<?php
8988
9089
require_once '$requirePath';
9190
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');
9493
\$loader->register();
9594
9695
\$kernel = unserialize('$kernel');

src/Symfony/Component/HttpKernel/Tests/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testGetScript()
5050
$this->markTestSkipped('The "Process" component is not available');
5151
}
5252

53-
if (!class_exists('Symfony\Component\ClassLoader\UniversalClassLoader')) {
53+
if (!class_exists('Symfony\Component\ClassLoader\ClassLoader')) {
5454
$this->markTestSkipped('The "ClassLoader" component is not available');
5555
}
5656

src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
require_once __DIR__.'/../../../../ClassLoader/UniversalClassLoader.php';
12+
require_once __DIR__.'/../../../../ClassLoader/ClassLoader.php';
1313

14-
use Symfony\Component\ClassLoader\UniversalClassLoader;
14+
use Symfony\Component\ClassLoader\ClassLoader;
1515
use Symfony\Component\Finder\Finder;
1616
use Symfony\Component\Security\Acl\Dbal\Schema;
1717

18-
$loader = new UniversalClassLoader();
19-
$loader->registerNamespaces(array(
18+
$loader = new ClassLoader();
19+
$loader->addPrefixes(array(
2020
'Symfony' => __DIR__.'/../../../../../..',
2121
'Doctrine\\Common' => __DIR__.'/../../../../../../../vendor/doctrine-common/lib',
2222
'Doctrine\\DBAL\\Migrations' => __DIR__.'/../../../../../../../vendor/doctrine-migrations/lib',

0 commit comments

Comments
 (0)