Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,16 @@ public function tempnam(string $dir, string $prefix, string $suffix = ''): strin
* Atomically dumps content into a file.
*
* @param string|resource $content The data to write into the file
* @param bool $ignoreOnTest If phpunit should create a file or not.
*
* @throws IOException if the file cannot be written to
*/
public function dumpFile(string $filename, $content): void
public function dumpFile(string $filename, $content, bool $ignoreOnTest = false): void
{
if ($ignoreOnTest) {
return;
}

if (\is_array($content)) {
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
}
Expand Down