Remove deprecated feature
This commit is contained in:
parent
9a6d3e5557
commit
cce2dd1d5e
@ -5,6 +5,7 @@ CHANGELOG
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
* removed the backup feature of the `FileDumper` class
|
* removed the backup feature of the `FileDumper` class
|
||||||
|
* removed `TranslationWriter::writeTranslations()` method
|
||||||
|
|
||||||
3.4.0
|
3.4.0
|
||||||
-----
|
-----
|
||||||
|
@ -18,22 +18,6 @@ use Symfony\Component\Translation\Writer\TranslationWriter;
|
|||||||
|
|
||||||
class TranslationWriterTest extends TestCase
|
class TranslationWriterTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @group legacy
|
|
||||||
* @expectedDeprecation Method Symfony\Component\Translation\Writer\TranslationWriter::writeTranslations() is deprecated since version 3.4 and will be removed in 4.0. Use write() instead.
|
|
||||||
*/
|
|
||||||
public function testWriteTranslations()
|
|
||||||
{
|
|
||||||
$dumper = $this->getMockBuilder('Symfony\Component\Translation\Dumper\DumperInterface')->getMock();
|
|
||||||
$dumper
|
|
||||||
->expects($this->once())
|
|
||||||
->method('dump');
|
|
||||||
|
|
||||||
$writer = new TranslationWriter();
|
|
||||||
$writer->addDumper('test', $dumper);
|
|
||||||
$writer->writeTranslations(new MessageCatalogue(array()), 'test');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testWrite()
|
public function testWrite()
|
||||||
{
|
{
|
||||||
$dumper = $this->getMockBuilder('Symfony\Component\Translation\Dumper\DumperInterface')->getMock();
|
$dumper = $this->getMockBuilder('Symfony\Component\Translation\Dumper\DumperInterface')->getMock();
|
||||||
|
@ -89,21 +89,4 @@ class TranslationWriter implements TranslationWriterInterface
|
|||||||
// save
|
// save
|
||||||
$dumper->dump($catalogue, $options);
|
$dumper->dump($catalogue, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes translation from the catalogue according to the selected format.
|
|
||||||
*
|
|
||||||
* @param MessageCatalogue $catalogue The message catalogue to write
|
|
||||||
* @param string $format The format to use to dump the messages
|
|
||||||
* @param array $options Options that are passed to the dumper
|
|
||||||
*
|
|
||||||
* @throws InvalidArgumentException
|
|
||||||
*
|
|
||||||
* @deprecated since 3.4 will be removed in 4.0. Use write instead.
|
|
||||||
*/
|
|
||||||
public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array())
|
|
||||||
{
|
|
||||||
@trigger_error(sprintf('Method %s() is deprecated since version 3.4 and will be removed in 4.0. Use write() instead.', __METHOD__), E_USER_DEPRECATED);
|
|
||||||
$this->write($catalogue, $format, $options);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user