Repository navigation
Drop the LocaleListener test case that pinned Symfony's prefix matching - #22
Merged
mSprunskas merged 1 commit intoOct 27, 2026
Conversation
The case expected the header "d" to select the configured locale "de" on Symfony 7.1 and later. Symfony's 7.4 branch now matches whole subtags in Request::getPreferredLanguage() (symfony/symfony f753a76fa2), so from the next 7.4 patch release "d" matches nothing and the listener keeps the locale. The case tested Symfony's matching rule, not the bundle; the listener's "nothing matched keeps the locale" path stays covered by the other cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Torus-Session: 1d8a246d-57ea-4dc2-bce3-87e42e38f61f
mSprunskas
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #21, from Marius's review.
1. LocaleListener test case breaks on the next Symfony 7.4 patch release (fixed here)
Symfony's 7.4 branch now matches whole subtags in
Request::getPreferredLanguage()(symfony/symfony@f753a76fa2, 2026-10-25). The latest release, v7.4.21, does not have this change yet. From v7.4.22, the headerdno longer matches the configured localede. The case'a tag that a configured locale starts with, from Symfony 7.1 matched to that locale'expectedde, so thesymfony: '7.*'jobs would fail.This PR removes that case. It tested Symfony's matching rule, not the bundle. The listener's behaviour when no locale matches (it keeps the locale) is still covered on every Symfony version by
['de']withen,no match keeps the localeanda malformed item is not a language. Accepting bothdeandunchangedwould have made the case assert nothing about the bundle. The production code needs no change.Local verification
I ran two targeted
symfony/http-foundationchecks with plci, Paysera's internal tool for running CI locally (PHP 8.4, highest dependencies, phpunit airgapped). Each check comes from a local-only CI file, which is not part of this PR:58c89144)3fc0bc79, has the subtag match)'de', ['de'], 'd')The 7.4.x-dev run failed on that one case only, which confirms that the other Symfony 7.1+ cases (
en,en-GB,lt, higher priority) give the same results under the new matching.2.
doctrine/annotationsis abandoned (no change)Confirmed: 2.0.2 is its last version, and Packagist marks it abandoned. Composer shows the warning on every install, whatever the Symfony version. It is still needed in 2.x:
RestRouteConfiguratortypes it at the import, the?Readerparameter and two private methods.AnnotationReaderdirectly.Moving it to
suggestwould break those apps, so that belongs in 3.0.🤖 Generated with Claude Code