Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[TwigBridge] suggest Translation Component when TranslationExtension is used#31761

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:4.3fromnicolas-grekas:twig-trans
Jun 1, 2019

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#31754
LicenseMIT
Doc PR-

@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.',__METHOD__),E_USER_DEPRECATED);
if (null ===$this->translator) {
if (!interface_exists(TranslatorInterface::class)) {
thrownew \LogicException(sprintf('You cannot use the "%s" if the Translation Contracts are not available. Try running "composer require symfony/translation-contracts".',__CLASS__));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What about recommendingsymfony/translator instead? If there are some usage of the Translation extension, it means that people want to use translation. So, they need the concrete implementation, not just the contracts.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why not. What's the use case for using the extension without providing it a translator?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The only use case is for third-party bundles using translations, but that must be compatible with projects not using translations. But anyway, the main usage is when people wants to use translations, in which case, we need to recommend the implementation.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ACK, updated

@nicolas-grekasnicolas-grekas changed the title[TwigBridge] suggest Translation Contracts when TranslationExtension is used[TwigBridge] suggest Translation Component when TranslationExtension is usedJun 1, 2019
@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commitd4a9e7e intosymfony:4.3Jun 1, 2019
fabpot added a commit that referenced this pull requestJun 1, 2019
…nExtension is used (nicolas-grekas)This PR was merged into the 4.3 branch.Discussion----------[TwigBridge] suggest Translation Component when TranslationExtension is used| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31754| License       | MIT| Doc PR        | -Commits-------d4a9e7e [TwigBridge] suggest Translation Component when TranslationExtension is used
@nicolas-grekasnicolas-grekas deleted the twig-trans branchJune 5, 2019 14:41
@fabpotfabpot mentioned this pull requestJun 6, 2019
mhujer added a commit to mhujer/BreadcrumbsBundle that referenced this pull requestNov 23, 2019
symfony/twig-bridge 4.3.1 is needed because ofsymfony/symfony#31761
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

3 participants

@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp