Skip to content

Commit 900b2f1

Browse files
Remove BC layers related to new methods and new parameters
1 parent 47a1b2f commit 900b2f1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.0
5+
---
6+
7+
* Add argument `$lock` to `Filesystem::appendToFile()`
8+
49
5.4
510
---
611

Filesystem.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ public function dumpFile(string $filename, $content)
703703
*
704704
* @throws IOException If the file is not writable
705705
*/
706-
public function appendToFile(string $filename, $content/* , bool $lock = false */)
706+
public function appendToFile(string $filename, $content, bool $lock = false)
707707
{
708708
if (\is_array($content)) {
709709
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
@@ -715,8 +715,6 @@ public function appendToFile(string $filename, $content/* , bool $lock = false *
715715
$this->mkdir($dir);
716716
}
717717

718-
$lock = \func_num_args() > 2 && func_get_arg(2);
719-
720718
if (false === self::box('file_put_contents', $filename, $content, \FILE_APPEND | ($lock ? \LOCK_EX : 0))) {
721719
throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename);
722720
}

0 commit comments

Comments
 (0)