Merge branch '2.3' into 2.7

* 2.3:
  bug #14246 [Filesystem] dumpFile() non atomic

Conflicts:
	src/Symfony/Component/Filesystem/Filesystem.php
This commit is contained in:
Nicolas Grekas 2015-12-31 10:09:12 +01:00
commit ddab6278a2
1 changed files with 2 additions and 2 deletions

View File

@ -478,14 +478,14 @@ class Filesystem
throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
}
$this->rename($tmpFile, $filename, true);
if (null !== $mode) {
if (func_num_args() > 2) {
@trigger_error('Support for modifying file permissions is deprecated since version 2.3.12 and will be removed in 3.0.', E_USER_DEPRECATED);
}
$this->chmod($filename, $mode);
$this->chmod($tmpFile, $mode);
}
$this->rename($tmpFile, $filename, true);
}
/**