From fd924da17a7c463bdfb02bb4d636cd7299aea454 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 5 Jan 2026 15:08:29 +0100 Subject: [PATCH] Add configuration for exposing VersionProvider --- .changes/unreleased/Feature-20260105-150741.yaml | 5 +++++ .gitignore | 3 +++ config/packages/twig_chill.yaml | 3 +++ config/services.yaml | 5 +++++ 4 files changed, 16 insertions(+) create mode 100644 .changes/unreleased/Feature-20260105-150741.yaml diff --git a/.changes/unreleased/Feature-20260105-150741.yaml b/.changes/unreleased/Feature-20260105-150741.yaml new file mode 100644 index 0000000..4f7ffc9 --- /dev/null +++ b/.changes/unreleased/Feature-20260105-150741.yaml @@ -0,0 +1,5 @@ +kind: Feature +body: Display version of chill bundles in application footer +time: 2026-01-05T15:07:41.09639691+01:00 +custom: + Issue: "" diff --git a/.gitignore b/.gitignore index 7a0b615..6a762dd 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ phpstan.neon .phpunit.result.cache /phpunit.xml ###< symfony/phpunit-bridge ### + +.idea/* +/bin/* \ No newline at end of file diff --git a/config/packages/twig_chill.yaml b/config/packages/twig_chill.yaml index 15a3066..e66126a 100644 --- a/config/packages/twig_chill.yaml +++ b/config/packages/twig_chill.yaml @@ -9,6 +9,9 @@ twig: # and adapt it lightly. # form_themes: ['@ChillMain/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig'] + globals: + # Expose the VersionProvider service to Twig as a global to have access to chill bundles version + chillBundlesVersion: '@Chill\MainBundle\Service\VersionProvider' when@dev: twig: diff --git a/config/services.yaml b/config/services.yaml index 2d6a76f..203cfd5 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -22,3 +22,8 @@ services: # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones + + # provide version of installed chill bundles for display in interface + Chill\MainBundle\Service\VersionProvider: + arguments: + $packageName: 'chill-project/chill-bundles'