Skip to content

[FrameworkBundle] Wire the translation.reader service instead of deprecated translation.loader in commands #24943

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
Nov 13, 2017
Merged

[FrameworkBundle] Wire the translation.reader service instead of deprecated translation.loader in commands #24943

merged 1 commit into from
Nov 13, 2017

Conversation

ogizanagi
Copy link
Contributor

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

to get rid of the following deprec:

The class "Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader" is deprecated since version 3.4 and will be removed in 4.0. Use "Symfony\Component\Translation\Reader\TranslationReader"

@fabpot
Copy link
Member

fabpot commented Nov 13, 2017

Thank you @ogizanagi.

@fabpot fabpot merged commit 8da283b into symfony:3.4 Nov 13, 2017
fabpot added a commit that referenced this pull request Nov 13, 2017
…ead of deprecated translation.loader in commands (ogizanagi)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Wire the translation.reader service instead of deprecated translation.loader in commands

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

to get rid of the following deprec:

> The class "Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader" is deprecated since version 3.4 and will be removed in 4.0. Use "Symfony\Component\Translation\Reader\TranslationReader"

Commits
-------

8da283b [FrameworkBundle] Wire the translation.reader service instead of deprecated translation.loader in commands
@ogizanagi ogizanagi deleted the fix/3.4/trans_commands_use_reader branch November 13, 2017 15:11
@kbond
Copy link
Member

kbond commented Nov 13, 2017

@ogizanagi I'm still seeing a deprecation message when building the container.

@ogizanagi
Copy link
Contributor Author

ogizanagi commented Nov 13, 2017

@kbond : This is not released yet. Did you apply this patch locally but still having this deprec?

@kbond
Copy link
Member

kbond commented Nov 13, 2017

Yes, latest 3.4 branch

@ogizanagi
Copy link
Contributor Author

Could you please check for occurrences of translation.loader in your project? Any vendor likely to use the deprecated service rather than translation.reader?

@kbond
Copy link
Member

kbond commented Nov 13, 2017

No and I see it on a fresh symfony-standard app (downloaded 3.4, ran composer update, enabled translation in app/config/config.yml)

@kbond
Copy link
Member

kbond commented Nov 13, 2017

I was able to stop the dep message by removing this line:

$container->getDefinition('translation.loader')->setPrivate(true);

But I'm not sure why that worked...

@ogizanagi
Copy link
Contributor Author

I've opened #24959 to keep track of this. Thanks for the report. :)

This was referenced Nov 21, 2017
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.

5 participants