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 6c3ddf1

Browse filesBrowse files
committed
[Translation] deprecate the backup feature
1 parent b03d370 commit 6c3ddf1
Copy full SHA for 6c3ddf1

File tree

Expand file treeCollapse file tree

5 files changed

+20
-0
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+20
-0
lines changed

‎UPGRADE-3.1.md

Copy file name to clipboardExpand all lines: UPGRADE-3.1.md
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ Serializer
7272
deprecated and will not be supported in Symfony 4.0. You should use the
7373
`CacheClassMetadataFactory` class instead.
7474

75+
Translation
76+
-----------
77+
78+
* Deprecated the backup feature of the file dumper classes. It will be removed
79+
in Symfony 4.0.
80+
7581
Yaml
7682
----
7783

‎UPGRADE-4.0.md

Copy file name to clipboardExpand all lines: UPGRADE-4.0.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ Serializer
6868
class has been removed. You should use the `CacheClassMetadataFactory` class
6969
instead.
7070

71+
Translation
72+
-----------
73+
74+
* Removed the backup feature from the file dumper classes.
75+
7176
Yaml
7277
----
7378

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/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.1.0
5+
-----
6+
7+
* Deprecated the backup feature of the file dumper classes.
8+
49
3.0.0
510
-----
611

‎src/Symfony/Component/Translation/Dumper/FileDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Dumper/FileDumper.php
+1Lines 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 {

‎src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php
+3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.