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
@trigger_error(sprintf('Passing "null" to "$locale" in %s has been deprecated since Symfony 4.4 and will throw an error in 5.0.', __METHOD__), E_USER_DEPRECATED);
* @expectedDeprecation Passing "null" to "$locale" in Symfony\Component\Translation\MessageCatalogue::__construct has been deprecated since Symfony 4.4 and will throw an error in 5.0.
// no assertion. this method just asserts that no exception is thrown
190
193
$this->addToAssertionCount(1);
191
194
}
192
195
196
+
/**
197
+
* @group legacy
198
+
* @expectedDeprecation Passing "null" to "$locale" in Symfony\Component\Translation\Translator::addResource has been deprecated since Symfony 4.4 and will throw an error in 5.0.
* @expectedDeprecation Passing "null" to "$locale" in Symfony\Component\Translation\Translator::addResource has been deprecated since Symfony 4.4 and will throw an error in 5.0.
Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Translator.php
+4
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,10 @@ public function addResource($format, $resource, $locale, $domain = null)
132
132
$domain = 'messages';
133
133
}
134
134
135
+
if (null === $locale) {
136
+
@trigger_error(sprintf('Passing "null" to "$locale" in %s has been deprecated since Symfony 4.4 and will throw an error in 5.0.', __METHOD__), E_USER_DEPRECATED);
0 commit comments