8000 remove check for PHP bug #50731 by xabbuh · Pull Request #8012 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

remove check for PHP bug #50731 #8012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/Symfony/Component/ClassLoader/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ public function loadClass($class)
*/
public function findFile($class)
{
if ('\\' == $class[0]) {
$class = substr($class, 1);
}

if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
Expand Down
8 changes: 0 additions & 8 deletions src/Symfony/Component/ClassLoader/MapClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ public function register($prepend = false)
*/
public function loadClass($class)
{
if ('\\' === $class[0]) {
$class = substr($class, 1);
}

if (isset($this->map[$class])) {
require $this->map[$class];
}
Expand All @@ -65,10 +61,6 @@ public function loadClass($class)
*/
public function findFile($class)
{
if ('\\' === $class[0]) {
$class = substr($class, 1);
}

if (isset($this->map[$class])) {
return $this->map[$class];
}
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/ClassLoader/Tests/ClassLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public function getLoadClassTests()
return array(
array('\\Namespaced2\\Foo', 'Namespaced2\\Foo', '->loadClass() loads Namespaced2\Foo class'),
array('\\Pearlike2_Foo', 'Pearlike2_Foo', '->loadClass() loads Pearlike2_Foo class'),
array('\\Namespaced2\\Bar', '\\Namespaced2\\Bar', '->loadClass() loads Namespaced2\Bar class with a leading slash'),
array('\\Pearlike2_Bar', '\\Pearlike2_Bar', '->loadClass() loads Pearlike2_Bar class with a leading slash'),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public function getLoadClassTests()
return array(
array('\\Namespaced\\Foo', 'Namespaced\\Foo', '->loadClass() loads Namespaced\Foo class'),
array('\\Pearlike_Foo', 'Pearlike_Foo', '->loadClass() loads Pearlike_Foo class'),
array('\\Namespaced\\Bar', '\\Namespaced\\Bar', '->loadClass() loads Namespaced\Bar class with a leading slash'),
array('\\Pearlike_Bar', '\\Pearlike_Bar', '->loadClass() loads Pearlike_Bar class with a leading slash'),
);
}

Expand Down
4 changes: 0 additions & 4 deletions src/Symfony/Component/ClassLoader/UniversalClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,6 @@ public function loadClass($class)
*/
public function findFile($class)
{
if ('\\' == $class[0]) {
$class = substr($class, 1);
}

if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$namespace = substr($class, 0, $pos);
Expand Down
0