From 676bb4d1baee03fbef45b4bcfa58b0d31577369a Mon Sep 17 00:00:00 2001 From: webeweb Date: Tue, 7 May 2024 11:30:25 +0200 Subject: [PATCH] Update Twig configuration: - add Quote Twig extension --- lib/common/Resources/config/twig.yml | 7 +++++++ .../Tests/DependencyInjection/WBWCommonExtensionTest.php | 2 ++ 2 files changed, 9 insertions(+) diff --git a/lib/common/Resources/config/twig.yml b/lib/common/Resources/config/twig.yml index 5d64f789..8a1da0e8 100644 --- a/lib/common/Resources/config/twig.yml +++ b/lib/common/Resources/config/twig.yml @@ -18,6 +18,13 @@ services: tags: - { name: "twig.extension" } + wbw.common.twig.extension.quote: + class: WBW\Bundle\CommonBundle\Twig\Extension\QuoteTwigExtension + public: false + arguments: [ "@twig", "@wbw.common.manager.quote" ] + tags: + - { name: "twig.extension" } + wbw.common.twig.extension.string: class: WBW\Bundle\CommonBundle\Twig\Extension\StringTwigExtension public: false diff --git a/lib/common/Tests/DependencyInjection/WBWCommonExtensionTest.php b/lib/common/Tests/DependencyInjection/WBWCommonExtensionTest.php index f1f1a386..2c8629f5 100644 --- a/lib/common/Tests/DependencyInjection/WBWCommonExtensionTest.php +++ b/lib/common/Tests/DependencyInjection/WBWCommonExtensionTest.php @@ -40,6 +40,7 @@ use WBW\Bundle\CommonBundle\Tests\AbstractTestCase; use WBW\Bundle\CommonBundle\Twig\Extension\AssetsTwigExtension; use WBW\Bundle\CommonBundle\Twig\Extension\ContainerTwigExtension; +use WBW\Bundle\CommonBundle\Twig\Extension\QuoteTwigExtension; use WBW\Bundle\CommonBundle\Twig\Extension\StringTwigExtension; /** @@ -150,6 +151,7 @@ public function testLoad(): void { // Twig extensions $this->assertInstanceOf(AssetsTwigExtension::class, $this->containerBuilder->get(AssetsTwigExtension::SERVICE_NAME)); $this->assertInstanceOf(ContainerTwigExtension::class, $this->containerBuilder->get(ContainerTwigExtension::SERVICE_NAME)); + $this->assertInstanceOf(QuoteTwigExtension::class, $this->containerBuilder->get(QuoteTwigExtension::SERVICE_NAME)); $this->assertInstanceOf(StringTwigExtension::class, $this->containerBuilder->get(StringTwigExtension::SERVICE_NAME)); }