Skip to content
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

[FrameworkBundle] Remove translation data_collector BEFORE adding it to profiler #39350

Merged

Conversation

l-vo
Copy link
Contributor

@l-vo l-vo commented Dec 6, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

There is an order problem between DataCollectorTranslatorPass and ProfilerPass. Currently DataCollectorTranslatorPass is registered after ProfilerPass. So if data_collector.translation is removed, it has already been added to the profiler and the compilation fails.

The simplest approach seems to move DataCollectorTranslatorPass before ProfilerPass.

Use case: When I want to use IdentityTranslator (for the test environment for instance) which doesn't implement TranslatorBagInterface.

@fabpot
Copy link
Member

fabpot commented Sep 21, 2021

Thank you @l-vo.

@fabpot fabpot merged commit 66e8ae9 into symfony:4.4 Sep 21, 2021
This was referenced Sep 28, 2021
@l-vo l-vo deleted the fix_translator_datacollector_removed_too_late branch December 17, 2021 21:50
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.

None yet

3 participants