minor #15624 consistently use str_replace to unify directory separators (2.7) (Tobion)
This PR was merged into the 2.7 branch.
Discussion
----------
consistently use str_replace to unify directory separators (2.7)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | -
Remaining ones from #15614
Commits
-------
17ce649
consistently use str_replace to unify directory separators (remaining)
This commit is contained in:
commit
9d6fdc3b50
|
@ -106,7 +106,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),
|
||||
));
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue