mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-18 13:26:37 +00:00
Merge branch '3.x' into 4.x
* 3.x: Fixing minor typo in Update inline_css.rst Ignore static properties when using the dot operator Fix CS Fix constant() behavior when used with ?? Finish the work fix indentation Apply suggestions from code review typo fix merge docs and changelog typehint instead of checkArrow checkArrow, typehints invoke filter
This commit is contained in:
@@ -395,7 +395,7 @@ class ExpressionParserTest extends TestCase
|
||||
public function testCompiledCodeForDynamicTest()
|
||||
{
|
||||
$env = new Environment(new ArrayLoader(['index' => '{{ "a" is foo_foo_bar_bar }}']), ['cache' => false, 'autoescape' => false]);
|
||||
$env->addExtension(new class() extends AbstractExtension {
|
||||
$env->addExtension(new class extends AbstractExtension {
|
||||
public function getTests(): array
|
||||
{
|
||||
return [
|
||||
@@ -410,7 +410,7 @@ class ExpressionParserTest extends TestCase
|
||||
public function testCompiledCodeForDynamicFunction()
|
||||
{
|
||||
$env = new Environment(new ArrayLoader(['index' => '{{ foo_foo_bar_bar("a") }}']), ['cache' => false, 'autoescape' => false]);
|
||||
$env->addExtension(new class() extends AbstractExtension {
|
||||
$env->addExtension(new class extends AbstractExtension {
|
||||
public function getFunctions(): array
|
||||
{
|
||||
return [
|
||||
@@ -425,7 +425,7 @@ class ExpressionParserTest extends TestCase
|
||||
public function testCompiledCodeForDynamicFilter()
|
||||
{
|
||||
$env = new Environment(new ArrayLoader(['index' => '{{ "a"|foo_foo_bar_bar }}']), ['cache' => false, 'autoescape' => false]);
|
||||
$env->addExtension(new class() extends AbstractExtension {
|
||||
$env->addExtension(new class extends AbstractExtension {
|
||||
public function getFilters(): array
|
||||
{
|
||||
return [
|
||||
@@ -451,10 +451,10 @@ class ExpressionParserTest extends TestCase
|
||||
public function testUnaryPrecedenceChange()
|
||||
{
|
||||
$env = new Environment(new ArrayLoader(), ['cache' => false, 'autoescape' => false]);
|
||||
$env->addExtension(new class () extends AbstractExtension {
|
||||
$env->addExtension(new class extends AbstractExtension {
|
||||
public function getOperators(): array
|
||||
{
|
||||
$class = new class (new ConstantExpression('foo', 1), 1) extends AbstractUnary {
|
||||
$class = new class(new ConstantExpression('foo', 1), 1) extends AbstractUnary {
|
||||
public function operator(Compiler $compiler): Compiler
|
||||
{
|
||||
return $compiler->raw('!');
|
||||
|
||||
Reference in New Issue
Block a user