Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+10 -2
View File
@@ -15,6 +15,8 @@ namespace Symfony\Component\Translation;
* Returns the plural rules for a given locale.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 4.2, use IdentityTranslator instead
*/
class PluralizationRules
{
@@ -28,8 +30,12 @@ class PluralizationRules
*
* @return int The plural position
*/
public static function get($number, $locale)
public static function get($number, $locale/*, bool $triggerDeprecation = true*/)
{
if (3 > \func_num_args() || func_get_arg(2)) {
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
}
if ('pt_BR' === $locale) {
// temporary set a locale for brazilian
$locale = 'xbr';
@@ -40,7 +46,7 @@ class PluralizationRules
}
if (isset(self::$rules[$locale])) {
$return = \call_user_func(self::$rules[$locale], $number);
$return = self::$rules[$locale]($number);
if (!\is_int($return) || $return < 0) {
return 0;
@@ -196,6 +202,8 @@ class PluralizationRules
*/
public static function set(callable $rule, $locale)
{
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
if ('pt_BR' === $locale) {
// temporary set a locale for brazilian
$locale = 'xbr';