From e1caf7da7f73fcfcfa3243d0edefc27b813b71e7 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Fri, 17 Mar 2017 09:56:29 +0100 Subject: [PATCH] =?UTF-8?q?[FrameworkBundle]=C2=A0Fix=20translation=20dep?= =?UTF-8?q?=20constraint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tests/Translation/TranslatorTest.php | 11 +++++++++++ src/Symfony/Bundle/FrameworkBundle/composer.json | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index 1ac206185589c..d9efdfe6e94d5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -136,6 +136,17 @@ public function testGetDefaultLocale() $this->assertSame('en', $translator->getLocale()); } + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + * @expectedExceptionMessage The Translator does not support the following options: 'foo' + */ + public function testInvalidOptions() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + + (new Translator($container, new MessageSelector(), array(), array('foo' => 'bar'))); + } + protected function getCatalogue($locale, $messages, $resources = array()) { $catalogue = new MessageCatalogue($locale); diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 5daeec7e4e76d..965bda053cfb8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -47,7 +47,7 @@ "symfony/security-core": "~3.2", "symfony/security-csrf": "~2.8|~3.0", "symfony/serializer": "~2.8|~3.0", - "symfony/translation": "~2.8|~3.0", + "symfony/translation": "~3.2", "symfony/templating": "~2.8|~3.0", "symfony/validator": "~3.2", "symfony/yaml": "~3.2", @@ -60,7 +60,8 @@ "conflict": { "phpdocumentor/reflection-docblock": "<3.0", "phpdocumentor/type-resolver": "<0.2.0", - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/translations": "<3.2" }, "suggest": { "ext-apcu": "For best performance of the system caches",