Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Translation] Document empty-$domains behavior on ProviderInterface::read()#64188

Open
ousamabenyounes wants to merge 2 commits into
symfony:6.4from
ousamabenyounes:fix/issue-64155
Open

[Translation] Document empty-$domains behavior on ProviderInterface::read()#64188
ousamabenyounes wants to merge 2 commits into
symfony:6.4from
ousamabenyounes:fix/issue-64155

Conversation

@ousamabenyounes
Copy link
Copy Markdown
Contributor

@ousamabenyounes ousamabenyounes commented May 12, 2026

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Issues Fix #64155
License MIT

ProviderInterface::read() was undocumented for the empty-$domains case, and the bundled bridges disagree on the actual behavior:

Provider read([], $locales)
Crowdin fetches all files irrespective of $domains
Phrase returns an empty bag (the foreach ($domains as ...) body is skipped)
Lokalise passes an empty filter array to the API
Loco falls back to ['*'], returns all domains

Rather than unifying these (which would be a BC break on at least Loco), this PR documents the variation in the interface PHPDoc so callers know to pass an explicit domain list for portable behavior.

No runtime change: the docblock edit on ProviderInterface::read() is the entire diff.

@carsonbot carsonbot added this to the 6.4 milestone May 12, 2026
@ousamabenyounes ousamabenyounes changed the title [Translation] Return an empty TranslatorBag when no domains are passed to providers [Translation] Document empty-$domains behavior on ProviderInterface::read() May 12, 2026
@nicolas-grekas
Copy link
Copy Markdown
Member

I'd rather decide for a uniform contracts and target 8.2 (8.1 for now, 8.2 when it's branched out)

@nicolas-grekas nicolas-grekas modified the milestones: 6.4, 8.2 May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants