Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle][Translator] Fix cache warmer translator lazy-loading #23293

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

Closed
wants to merge 1 commit into from
Closed

[FrameworkBundle][Translator] Fix cache warmer translator lazy-loading #23293

wants to merge 1 commit into from

Conversation

ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented Jun 25, 2017

Q A
Branch? 2.8
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

Not really a bug fix, but in #23014, we expected to lazy load the cache warmer's translator by injecting the container instead. But the LoggingTranslatorPass replaces it, and it results in a deprecation raised in 3.4.

The issue with this patch and the original PR intent however is that the translator you get from the container might be a decorated one (DataCollectorTranslator for instance) which may not implement WarmableInterface, making the warmer ineffective...

Considering #23014 issue mainly was about the TemplateCacheWarmer, I'm torn between this patch, reverting changes in TranslationsCacheWarmer or finding some other ugly workarounds.

nicolas-grekas
nicolas-grekas previously approved these changes Jul 3, 2017
@nicolas-grekas
Copy link
Member

@ogizanagi starting with 3.3, can't we configure the injected service locator to use translator.logging.inner for the translator index? can you do the PR please?

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Jul 3, 2017

In fact, I propose to NOT merge this PR and let things as is. Yes, the warmer is not lazy when the logging translator is used, but at least warm up works. Starting with 3.3, see previous comment :)

@nicolas-grekas nicolas-grekas dismissed their stale review July 3, 2017 14:40

better option proposed

@ogizanagi
Copy link
Contributor Author

See #23370

I'm closing this one for the reasons explained above by @nicolas-grekas :)

@ogizanagi ogizanagi closed this Jul 4, 2017
fabpot added a commit that referenced this pull request Jul 4, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Wire inner translator

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #23293 (comment)
| License       | MIT
| Doc PR        | N/A

Commits
-------

a32cae5 [FrameworkBundle] Wire inner translator
@ogizanagi ogizanagi deleted the fix/trans_cache_warmer_lazy_loading branch July 4, 2017 10:49
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.