You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -42,6 +42,159 @@ protected function deleteTmpDir()
42
42
$fs->remove($dir);
43
43
}
44
44
45
+
/**
46
+
* @group legacy
47
+
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.
160
+
* @expectedException \InvalidArgumentException
161
+
* @expectedExceptionMessage A default locale must be passed as 3rd argument of Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() since version 3.3, the argument will be mandatory in 4.0.
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.
172
+
*/
173
+
publicfunctiontestWarmupOmittingLocale()
174
+
{
175
+
$loader = new \Symfony\Component\Translation\Loader\YamlFileLoader();
// BC 3.x, to be removed in 4.0 along with the $defaultLocale default value
61
+
if (is_array($defaultLocale) || 3 > func_num_args()) {
62
+
@trigger_error(sprintf('Method %s() takes the default locale as 3rd argument since version 3.3. Not passing it is deprecated and will trigger an error in 4.0.', __METHOD__), E_USER_DEPRECATED);
63
+
$options = $loaderIds;
64
+
$loaderIds = $defaultLocale;
65
+
66
+
if (!$containerinstanceof SymfonyContainerInterface) {
67
+
thrownew \InvalidArgumentException(sprintf('A default locale must be passed as 3rd argument of %s() since version 3.3, the argument will be mandatory in 4.0.', __METHOD__));
0 commit comments