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

[Translation] modify definitions only if the do exist #25174

Merged
merged 1 commit into from Nov 27, 2017

Conversation

@xabbuh
Copy link
Member

@xabbuh xabbuh commented Nov 27, 2017

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

If the TranslatorPass is used an application without the Console
component, the commands will not be registered. Thus, their service
definitions must not be modified.

@@ -81,8 +81,13 @@ public function process(ContainerBuilder $container)
;

if ($container->hasParameter('twig.default_path')) {
Copy link
Member

@nicolas-grekas nicolas-grekas Nov 27, 2017

Choose a reason for hiding this comment

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

if (!...) {return;}?

Loading

Copy link
Member Author

@xabbuh xabbuh Nov 27, 2017

Choose a reason for hiding this comment

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

done

Loading

If the `TranslatorPass` is used an application without the Console
component, the commands will not be registered. Thus, their service
definitions must not be modified.
@xabbuh xabbuh force-pushed the translation-commands-check branch from d753620 to eab90ef Nov 27, 2017
fabpot
fabpot approved these changes Nov 27, 2017
@fabpot
Copy link
Member

@fabpot fabpot commented Nov 27, 2017

Thank you @xabbuh.

Loading

@fabpot fabpot merged commit eab90ef into symfony:3.4 Nov 27, 2017
2 of 3 checks passed
Loading
fabpot added a commit that referenced this issue Nov 27, 2017
…buh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] modify definitions only if the do exist

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

If the `TranslatorPass` is used an application without the Console
component, the commands will not be registered. Thus, their service
definitions must not be modified.

Commits
-------

eab90ef modify definitions only if the do exist
@xabbuh xabbuh deleted the translation-commands-check branch Nov 27, 2017
@fabpot fabpot mentioned this pull request Nov 30, 2017
@fabpot fabpot mentioned this pull request Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants