From 17ce6492d97c609f0a9db8fdd3279fd7e42c940d Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Wed, 26 Aug 2015 20:02:40 +0200 Subject: [PATCH] consistently use str_replace to unify directory separators (remaining) --- .../SecurityBundle/Tests/Functional/SetAclCommandTest.php | 2 +- .../Component/HttpKernel/DataCollector/DumpDataCollector.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php index 9a4a5e9a10..27cdd41a0d 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php @@ -89,7 +89,7 @@ class SetAclCommandTest extends WebTestCase $setAclCommandTester = new CommandTester($setAclCommand); $setAclCommandTester->execute(array( 'command' => 'acl:set', - 'arguments' => array($grantedPermission, sprintf('%s:%s', strtr(self::OBJECT_CLASS, '\\', '/'), $objectId)), + 'arguments' => array($grantedPermission, sprintf('%s:%s', str_replace('\\', '/', self::OBJECT_CLASS), $objectId)), '--role' => array($role), )); diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php index 09abfb125b..efb0bb3e6e 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php @@ -120,7 +120,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface } if (false === $name) { - $name = strtr($file, '\\', '/'); + $name = str_replace('\\', '/', $file); $name = substr($name, strrpos($name, '/') + 1); }