Skip to content

Ignore missing translation dependency in FrameworkBundle #32664

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
Jul 22, 2019

Conversation

alcaeus
Copy link
Contributor

@alcaeus alcaeus commented Jul 22, 2019

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

This applies the fix from #31156 to the validator.xml file. The error came up a couple of times in the test suite for DoctrineBundle. When using symfony/framework-bundle with symfony/validator installed but without symfony/translation, the call to setTranslator will error out because of the missing translator service. Thus, the call to setTranslator needs to ignore a missing translator dependency to support this scenario.

I don't know how to best test this since the translation component is present in the require-dev directive of FrameworkBundle's composer.json. If you have any suggestions how to achieve this, please let me know.

When using symfony/framework-bundle with symfony/validator installed but without symfony/translation, the call to setTranslator will error out because of the missing translator service. Thus, the call to setTranslator needs to ignore a missing translator dependency to support this scenario.
@alcaeus alcaeus force-pushed the fix-implicit-translation-dependency branch from b2cdba8 to 19eb90d Compare July 22, 2019 19:42
@chalasr chalasr added this to the 3.4 milestone Jul 22, 2019
@Tobion
Copy link
Contributor

Tobion commented Jul 22, 2019

Thank you @alcaeus.

@Tobion Tobion merged commit 19eb90d into symfony:3.4 Jul 22, 2019
Tobion added a commit that referenced this pull request Jul 22, 2019
… (alcaeus)

This PR was merged into the 3.4 branch.

Discussion
----------

Ignore missing translation dependency in FrameworkBundle

| 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        |

This applies the fix from #31156 to the validator.xml file. The error came up a couple of times in the test suite for DoctrineBundle. When using `symfony/framework-bundle` with `symfony/validator` installed but without `symfony/translation`, the call to `setTranslator` will error out because of the missing `translator` service. Thus, the call to `setTranslator` needs to ignore a missing translator dependency to support this scenario.

I don't know how to best test this since the translation component is present in the `require-dev` directive of FrameworkBundle's `composer.json`. If you have any suggestions how to achieve this, please let me know.

Commits
-------

19eb90d Ignore missing translation dependency in FrameworkBundle
@alcaeus alcaeus deleted the fix-implicit-translation-dependency branch July 23, 2019 04:46
alcaeus added a commit to alcaeus/DoctrineBundle that referenced this pull request Jul 30, 2019
alcaeus added a commit to alcaeus/DoctrineBundle that referenced this pull request Jul 30, 2019
alcaeus added a commit to alcaeus/DoctrineBundle that referenced this pull request Jul 30, 2019
alcaeus added a commit to alcaeus/DoctrineBundle that referenced this pull request Jul 30, 2019
alcaeus added a commit to alcaeus/DoctrineBundle that referenced this pull request Jul 30, 2019
alcaeus added a commit to alcaeus/DoctrineBundle that referenced this pull request Aug 24, 2019
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