8000 merged branch xabbuh/issue8007-master (PR #8052) · richsage/symfony@c31caca · GitHub
[go: up one dir, main page]

Skip to content

Commit c31caca

Browse files
committed
merged branch xabbuh/issue8007-master (PR symfony#8052)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes symfony#8052). Discussion ---------- remove check for PHP bug symfony#50731 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#8007 | License | MIT | Doc PR | Commits ------- 28534a6 remove check for PHP bug symfony#50731
2 parents 2b3a0b9 + 95f356b commit c31caca

File tree

5 files changed

+0
-20
lines changed

5 files changed

+0
-20
lines changed

src/Symfony/Component/ClassLoader/ClassLoader.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ public function loadClass($class)
164164
*/
165165
public function findFile($class)
166166
{
167-
if ('\\' == $class[0]) {
168-
$class = substr($class, 1);
169-
}
170-
171167
if (false !== $pos = strrpos($class, '\\')) {
172168
// namespaced class name
173169
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR;

src/Symfony/Component/ClassLoader/MapClassLoader.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ public function register($prepend = false)
4747
*/
4848
public function loadClass($class)
4949
{
50-
if ('\\' === $class[0]) {
51-
$class = substr($class, 1);
52-
}
53-
5450
if (isset($this->map[$class])) {
5551
require $this->map[$class];
5652
}
@@ -65,10 +61,6 @@ public function loadClass($class)
6561
*/
6662
public function findFile($class)
6763
{
68-
if ('\\' === $class[0]) {
69-
$class = substr($class, 1);
70-
}
71-
7264
if (isset($this->map[$class])) {
7365
return $this->map[$class];
7466
}

src/Symfony/Component/ClassLoader/Tests/ClassLoaderTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ public function getLoadClassTests()
5454
return array(
5555
array('\\Namespaced2\\Foo', 'Namespaced2\\Foo', '->loadClass() loads Namespaced2\Foo class'),
5656
array('\\Pearlike2_Foo', 'Pearlike2_Foo', '->loadClass() loads Pearlike2_Foo class'),
57-
array('\\Namespaced2\\Bar', '\\Namespaced2\\Bar', '->loadClass() loads Namespaced2\Bar class with a leading slash'),
58-
array('\\Pearlike2_Bar', '\\Pearlike2_Bar', '->loadClass() loads Pearlike2_Bar class with a leading slash'),
5957
);
6058
}
6159

src/Symfony/Component/ClassLoader/Tests/UniversalClassLoaderTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ public function getLoadClassTests()
3232
return array(
3333
array('\\Namespaced\\Foo', 'Namespaced\\Foo', '->loadClass() loads Namespaced\Foo class'),
3434
array('\\Pearlike_Foo', 'Pearlike_Foo', '->loadClass() loads Pearlike_Foo class'),
35-
array('\\Namespaced\\Bar', '\\Namespaced\\Bar', '->loadClass() loads Namespaced\Bar class with a leading slash'),
36-
array('\\Pearlike_Bar', '\\Pearlike_Bar', '->loadClass() loads Pearlike_Bar class with a leading slash'),
3735
);
3836
}
3937

src/Symfony/Component/ClassLoader/UniversalClassLoader.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,6 @@ public function loadClass($class)
263263
*/
264264
public function findFile($class)
265265
{
266-
if ('\\' == $class[0]) {
267-
$class = substr($class, 1);
268-
}
269-
270266
if (false !== $pos = strrpos($class, '\\')) {
271267
// namespaced class name
272268
$namespace = substr($class, 0, $pos);

0 commit comments

Comments
 (0)
0