Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit efe2a93

Browse filesBrowse files
committed
feature #20612 [Filesystem] Add appendToFile() (chalasr)
This PR was merged into the 3.3-dev branch. Discussion ---------- [Filesystem] Add appendToFile() | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | todo So we could append content to a file: ```php (new Filesystem)->appendToFile($file, 'bar'); ``` instead of doing it in two steps: ```php if (false === $content = @file_get_contents($file)) { throw new \Exception(); } (new Filesystem)->dumpFile($file, $content.'bar'); ``` Doing it opt-in using `dumpFile(..., $append = false)` would have been enough but not possible for BC. Commits ------- 1f7b753 [Filesystem] Add appendToFile()
2 parents 2ee8626 + 1f7b753 commit efe2a93
Copy full SHA for efe2a93

File tree

1 file changed

+5
-0
lines changed
Filter options

1 file changed

+5
-0
lines changed

‎src/Symfony/Component/Filesystem/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.3.0
5+
-----
6+
7+
* added `appendToFile()` to append contents to existing files
8+
49
3.2.0
510
-----
611

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.