8000 Merge branch '3.0' · symfony/symfony@307ad07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 307ad07

Browse files
committed
Merge branch '3.0'
* 3.0: [WebProfilerBundle] Remove loading status from AJAX toolbar after error Add missing apostrophe in setSaveHandler phpdoc [VarDumper] Fix typo bug #14246 [Filesystem] dumpFile() negates default file permissions [FrameworkBundle] Add case in Kernel directory guess for PHPUnit [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
2 parents 960a0f4 + a16c752 commit 307ad07

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,14 @@ private static function getPhpUnitCliConfigArgument()
8080
if (preg_match('/^-[^ \-]*c$/', $testArg) || $testArg === '--configuration') {
8181
$dir = realpath($reversedArgs[$argIndex - 1]);
8282
break;
83-
} elseif (strpos($testArg, '--configuration=') === 0) {
83+
} elseif (0 === strpos($testArg, '--configuration=')) {
8484
$argPath = substr($testArg, strlen('--configuration='));
8585
$dir = realpath($argPath);
8686
break;
87+
} elseif (0 === strpos($testArg, '-c')) {
88+
$argPath = substr($testArg, strlen('-c'));
89+
$dir = realpath($argPath);
90+
break;
8791
}
8892
}
8993

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
Sfjs.removeClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
189189
} else if (state == 'error') {
190190
Sfjs.addClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
191+
Sfjs.removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
191192
} else {
192193
Sfjs.addClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
193194
}

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,16 @@ public function dumpFile($filename, $content)
522522
throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
523523
}
524524

525+
// Will create a temp file with 0600 access rights
526+
// when the filesystem supports chmod.
525527
$tmpFile = $this->tempnam($dir, basename($filename));
526528

527529
if (false === @file_put_contents($tmpFile, $content)) {
528530
throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
529531
}
530532

533+
// Ignore for filesystems that do not support umask
534+
@chmod($tmpFile, 0666);
531535
$this->rename($tmpFile, $filename, true);
532536
}
533537

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Expand all lines: src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ public function testDumpFile()
10761076

10771077
// skip mode check on Windows
10781078
if ('\\' !== DIRECTORY_SEPARATOR) {
1079-
$this->assertFilePermissions(600, $filename);
1079+
$this->assertFilePermissions(666, $filename);
10801080
}
10811081
}
10821082

src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public function setOptions(array $options)
332332
* session.save_handler and session.save_path e.g.
333333
*
334334
* ini_set('session.save_handler', 'files');
335-
* ini_set('session.save_path', /tmp');
335+
* ini_set('session.save_path', '/tmp');
336336
*
337337
* or pass in a NativeSessionHandler instance which configures session.save_handler in the
338338
* constructor, for a template see NativeFileSessionHandler or use handlers in

src/Symfony/Component/VarDumper/Cloner/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function withMaxDepth($maxDepth)
5353
}
5454

5555
/**
56-
* Limits the numbers of elements per depth level.
56+
* Limits the number of elements per depth level.
5757
*
5858
* @param int $maxItemsPerDepth The max number of items dumped per depth level.
5959
*

0 commit comments

Comments
 (0)
0