Merge branch '3.x' into 4.x

* 3.x:
  Fix deprecations
  Fix intl-extra tests
  Fix CHANGELOG
This commit is contained in:
Fabien Potencier
2026-01-12 10:15:26 +01:00
3 changed files with 5 additions and 6 deletions
@@ -2,15 +2,15 @@
"script_names" function
--TEMPLATE--
{{ script_names('UNKNOWN')|length }}
{{ script_names()|length }}
{{ script_names('fr')|length }}
{{ script_names() is iterable }}
{{ script_names('fr') is iterable }}
{{ script_names()['Marc'] }}
{{ script_names('fr')['Marc'] }}
--DATA--
return [];
--EXPECT--
0
208
208
1
1
Marchen
Marchen
-1
View File
@@ -156,7 +156,6 @@ class ParserTest extends TestCase
], new Source('', '')));
$p = new \ReflectionProperty($parser, 'parent');
$p->setAccessible(true);
$this->assertNull($p->getValue($parser));
}
+1 -1
View File
@@ -178,7 +178,7 @@ class TemplateTest extends TestCase
$this->assertSame('One', $array['1']);
$this->assertSame('FloatButString', $array['1.5']);
$this->assertSame('IntegerButStringWithLeadingZeros', $array['01']);
$this->assertSame('EmptyString', $array[null]);
$this->assertSame('EmptyString', $array['']);
$this->assertSame('Zero', CoreExtension::getAttribute($twig, $template->getSourceContext(), $array, false), 'false is treated as 0 when accessing a sequence/mapping (equals PHP behavior)');
$this->assertSame('One', CoreExtension::getAttribute($twig, $template->getSourceContext(), $array, true), 'true is treated as 1 when accessing a sequence/mapping (equals PHP behavior)');