Skip to content

Commit 82a9232

Browse files
committed
[Translation] deprecate the backup feature
1 parent eb3f521 commit 82a9232

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
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+
3.1.0
5+
-----
6+
7+
* Deprecated the backup feature of the file dumper classes.
8+
49
3.0.0
510
-----
611

Dumper/FileDumper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public function dump(MessageCatalogue $messages, $options = array())
7373
$fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale());
7474
if (file_exists($fullpath)) {
7575
if ($this->backup) {
76+
@trigger_error('Creating a backup while dumping a message catalogue is deprecated since version 3.1 and will be removed in 4.0. Use TranslationWriter::disableBackup() to disable the backup.', E_USER_DEPRECATED);
7677
copy($fullpath, $fullpath.'~');
7778
}
7879
} else {

Tests/Dumper/FileDumperTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public function testDump()
2929
$this->assertTrue(file_exists($tempDir.'/messages.en.concrete'));
3030
}
3131

32+
/**
33+
* @group legacy
34+
*/
3235
public function testDumpBackupsFileIfExisting()
3336
{
3437
$tempDir = sys_get_temp_dir();

0 commit comments

Comments
 (0)