Skip to content

[Translator] Remove deprecated feature #24014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2017
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/Symfony/Component/Translation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
-----

* removed the backup feature of the `FileDumper` class
* removed `TranslationWriter::writeTranslations()` method

3.4.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,6 @@

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()
{
$dumper = $this->getMockBuilder('Symfony\Component\Translation\Dumper\DumperInterface')->getMock();
Expand Down
17 changes: 0 additions & 17 deletions src/Symfony/Component/Translation/Writer/TranslationWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,4 @@ public function write(MessageCatalogue $catalogue, $format, $options = array())
// save
$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);
}
}