[Translation] deprecate the backup feature
This commit is contained in:
parent
b03d370be0
commit
6c3ddf1d88
@ -72,6 +72,12 @@ Serializer
|
|||||||
deprecated and will not be supported in Symfony 4.0. You should use the
|
deprecated and will not be supported in Symfony 4.0. You should use the
|
||||||
`CacheClassMetadataFactory` class instead.
|
`CacheClassMetadataFactory` class instead.
|
||||||
|
|
||||||
|
Translation
|
||||||
|
-----------
|
||||||
|
|
||||||
|
* Deprecated the backup feature of the file dumper classes. It will be removed
|
||||||
|
in Symfony 4.0.
|
||||||
|
|
||||||
Yaml
|
Yaml
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -68,6 +68,11 @@ Serializer
|
|||||||
class has been removed. You should use the `CacheClassMetadataFactory` class
|
class has been removed. You should use the `CacheClassMetadataFactory` class
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
|
Translation
|
||||||
|
-----------
|
||||||
|
|
||||||
|
* Removed the backup feature from the file dumper classes.
|
||||||
|
|
||||||
Yaml
|
Yaml
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
3.1.0
|
||||||
|
-----
|
||||||
|
|
||||||
|
* Deprecated the backup feature of the file dumper classes.
|
||||||
|
|
||||||
3.0.0
|
3.0.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ abstract class FileDumper implements DumperInterface
|
|||||||
$fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale());
|
$fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale());
|
||||||
if (file_exists($fullpath)) {
|
if (file_exists($fullpath)) {
|
||||||
if ($this->backup) {
|
if ($this->backup) {
|
||||||
|
@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);
|
||||||
copy($fullpath, $fullpath.'~');
|
copy($fullpath, $fullpath.'~');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -29,6 +29,9 @@ class FileDumperTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue(file_exists($tempDir.'/messages.en.concrete'));
|
$this->assertTrue(file_exists($tempDir.'/messages.en.concrete'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group legacy
|
||||||
|
*/
|
||||||
public function testDumpBackupsFileIfExisting()
|
public function testDumpBackupsFileIfExisting()
|
||||||
{
|
{
|
||||||
$tempDir = sys_get_temp_dir();
|
$tempDir = sys_get_temp_dir();
|
||||||
|
Reference in New Issue
Block a user