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",