Skip to content

Commit 2aeaf10

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Update filesystem.rst
2 parents 77c1ad3 + 7dd2995 commit 2aeaf10

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/filesystem.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,16 @@ The ``file.txt`` file contains ``Hello World`` now.
307307
contents at the end of some file::
308308

309309
$filesystem->appendToFile('logs.txt', 'Email sent to [email protected]');
310+
// the third argument tells whether the file should be locked when writing to it
311+
$filesystem->appendToFile('logs.txt', 'Email sent to [email protected]', true);
310312

311313
If either the file or its containing directory doesn't exist, this method
312314
creates them before appending the contents.
313315

316+
.. versionadded:: 5.4
317+
318+
The third argument of ``appendToFile()`` was introduced in Symfony 5.4.
319+
314320
Error Handling
315321
--------------
316322

0 commit comments

Comments
 (0)