Skip to content

[symfony/translation] remove fallbacks config #1423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2025

Conversation

kbond
Copy link
Member

@kbond kbond commented May 29, 2025

Q A
License MIT
Doc issue/PR n/a

I was a confused why this fallbacks is needed - turns out it isn't, and uses the default_locale if not set. I suggest removing and letting the default_locale be used - this feels like the 90%+ case.

Having multiple fallbacks feels like a pretty advanced case.

This also falls under the recipe simplification initiative.

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 29, 2025 18:54
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1423/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1423/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'symfony/translation:^6.3'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

symfony/translation

3.3 vs 5.3
diff --git a/symfony/translation/3.3/config/packages/translation.yaml b/symfony/translation/5.3/config/packages/translation.yaml
index 05a2b3d..b3f8f9c 100644
--- a/symfony/translation/3.3/config/packages/translation.yaml
+++ b/symfony/translation/5.3/config/packages/translation.yaml
@@ -4,3 +4,4 @@ framework:
         default_path: '%kernel.project_dir%/translations'
         fallbacks:
             - en
+        providers:
5.3 vs 6.3
diff --git a/symfony/translation/5.3/config/packages/translation.yaml b/symfony/translation/6.3/config/packages/translation.yaml
index b3f8f9c..490bfc2 100644
--- a/symfony/translation/5.3/config/packages/translation.yaml
+++ b/symfony/translation/6.3/config/packages/translation.yaml
@@ -2,6 +2,4 @@ framework:
     default_locale: en
     translator:
         default_path: '%kernel.project_dir%/translations'
-        fallbacks:
-            - en
         providers:

@fabpot fabpot disabled auto-merge May 31, 2025 08:35
@fabpot fabpot merged commit 033182d into symfony:main May 31, 2025
1 of 2 checks passed
@kbond kbond deleted the trans-remove-fallbacks branch May 31, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants