From f7d48a78b59331ecaf488a09e9500139c21c6164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Egyed?= Date: Sat, 27 Nov 2021 03:06:50 +0100 Subject: [PATCH] Fix overriding the built-in form theme --- src/DependencyInjection/Compiler/AddTemplatesCompilerPass.php | 2 +- .../Compiler/AddTemplatesCompilerPassTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DependencyInjection/Compiler/AddTemplatesCompilerPass.php b/src/DependencyInjection/Compiler/AddTemplatesCompilerPass.php index 5f134e3b5..834f4b39c 100644 --- a/src/DependencyInjection/Compiler/AddTemplatesCompilerPass.php +++ b/src/DependencyInjection/Compiler/AddTemplatesCompilerPass.php @@ -61,7 +61,7 @@ public function mergeMethodCall(Definition $definition, string $name, $value): v continue; } - $call = [array_merge($call[0], $value)]; + $call = [array_merge($value, $call[0])]; } } diff --git a/tests/DependencyInjection/Compiler/AddTemplatesCompilerPassTest.php b/tests/DependencyInjection/Compiler/AddTemplatesCompilerPassTest.php index 2a6f6e31e..fac785416 100644 --- a/tests/DependencyInjection/Compiler/AddTemplatesCompilerPassTest.php +++ b/tests/DependencyInjection/Compiler/AddTemplatesCompilerPassTest.php @@ -42,7 +42,7 @@ public function testDefaultBehavior(): void $compilerPass->process($container); $expected = [ - ['setFilterTheme', [['custom_call.twig.html', '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig']]], + ['setFilterTheme', [['@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig', 'custom_call.twig.html']]], ['setFormTheme', [['@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig']]], ];