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

[FrameworkBundle][Translation] Move translation compiler pass#22619

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:3.4fromlepiaf:move-translation-compiler-pass
Jul 6, 2017
Merged

[FrameworkBundle][Translation] Move translation compiler pass#22619

fabpot merged 1 commit intosymfony:3.4fromlepiaf:move-translation-compiler-pass
Jul 6, 2017

Conversation

@lepiaf
Copy link
Contributor

@lepiaflepiaf commentedMay 3, 2017
edited
Loading

QA
Branch?3.4
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed ticketspart of#21284
LicenseMIT
Doc PRn/a

move TranslationDumperPass, TranslationExtractorPass, TranslatorPass to Translation component.

Copy link
Member

@stofstof left a comment

Choose a reason for hiding this comment

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

conflict rules are missing to ensure it does not get installed with an older version of symfony/translation (which would not allow registering it)

`Symfony\Component\Workflow\DependencyInjection\ValidateWorkflowsPass` class instead.

* The`Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslationDumperPass`
class has been deprecated and will be removed in 4.0. Use the
Copy link
Member

Choose a reason for hiding this comment

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

this will have to go in a new UPGRADE-3.4.md file actually. It is too late to include this in 3.3 as we already released the beta

useSymfony\Component\DependencyInjection\Reference;
useSymfony\Component\DependencyInjection\ContainerBuilder;
useSymfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
@trigger_error(sprintf('The %s class is deprecated since version 3.3 and will be removed in 4.0. UseSymfony\Component\Translation\DependencyInjection\TranslationDumperPass instead.', TranslationDumperPass::class),E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

3.4

@stofstof added this to the3.4 milestoneMay 3, 2017
Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

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

The Translator component needssymfony/dependency-injection:~3.3 as dev requirement and a conflict forsymfony/dependency-injection:<3.3. Also adding a test case for passes which miss one would be great.

{
publicfunctionprocess(ContainerBuilder$container)
{
if (!$container->hasDefinition('translation.extractor')) {
Copy link
Member

Choose a reason for hiding this comment

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

the "collector" service id should be configurable through a constructor argument, same for the collected tag e.g.__construct($extractorServiceId = 'translation.extractor', $extractorTag = 'translation.extractor')

{
publicfunctionprocess(ContainerBuilder$container)
{
if (!$container->hasDefinition('translator.default')) {
Copy link
Member

Choose a reason for hiding this comment

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

same here (constructor)

*/

namespaceSymfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
namespaceSymfony\Component\Translation\Tests\DependencyInjection;
Copy link
Member

Choose a reason for hiding this comment

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

The original test case should be kept inFrameworkBundle with@group legacy and copied to the component, not moved.

{
publicfunctionprocess(ContainerBuilder$container)
{
if (!$container->hasDefinition('translation.writer')) {
Copy link
Member

Choose a reason for hiding this comment

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

same here (constructor)

@chalasr
Copy link
Member

The fixed ticket would not be fixed actually, HttpKernel passes are still missing.

@lepiaf
Copy link
ContributorAuthor

@chalasr I'm currently working in another pr to move HttpKernel passes

* Deprecated`TranslationExtractorPass`, use
`Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass` instead
* Deprecated`TranslatorPass`, use
`Symfony\Component\Translation\DependencyInjection\TranslatorPass` instead
Copy link
Member

@chalasrchalasrMay 3, 2017
edited
Loading

Choose a reason for hiding this comment

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

2 extra spaces beforeSymfony

* Deprecated`TranslationDumperPass`, use
`Symfony\Component\Translation\DependencyInjection\TranslationDumperPass` instead
* Deprecated`TranslationExtractorPass`, use
`Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass` instead
Copy link
Member

@chalasrchalasrMay 3, 2017
edited
Loading

Choose a reason for hiding this comment

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

1 extra space beforeSymfony

@chalasr
Copy link
Member

@lepiaf thanks for working on this.

@lepiaflepiaf changed the title[FrameworkBundle][Translation] Move translation compiler pass[WIP][FrameworkBundle][Translation] Move translation compiler passMay 5, 2017
@lepiaf
Copy link
ContributorAuthor

I did all requested changes. I will add new test for moved class.

Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

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

~3.4 can't be used as a constraint yet, that breaks tests. I would let it as is and wait for 3.3 to be stable/ 3.4 branch to be created

},
"require-dev": {
"symfony/config":"~2.8|~3.0",
"symfony/dependency-injection":"~3.3",
Copy link
Member

@chalasrchalasrMay 7, 2017
edited
Loading

Choose a reason for hiding this comment

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

you need to add a conflict rule in order to prevent errors when using 3.3 features (these passes use ones)

$translatorServiceId ='translator.default',
$loaderServiceId ='translation.loader',
$loaderTag ='translation.loader'
) {
Copy link
Member

Choose a reason for hiding this comment

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

one-line signatures are preferred

* @param string $translatorServiceId
* @param string $loaderServiceId
* @param string $loaderTag
*/
Copy link
Member

Choose a reason for hiding this comment

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

phpdoc should be removed (same for properties, applies on the 3 passes), it doesn't give anything that an IDE couldn't guess

@lepiaflepiaf changed the title[WIP][FrameworkBundle][Translation] Move translation compiler pass[FrameworkBundle][Translation] Move translation compiler passMay 15, 2017
@lepiaflepiaf changed the base branch frommaster to3.4May 22, 2017 11:02
@xabbuh
Copy link
Member

@lepiaf3.3 and3.4 branches are a thing now. Can you rebase here?

@lepiaf
Copy link
ContributorAuthor

tests are failing but I don't know why. Issymfony/var-dumper missing in composer for frameworkbundle ?

Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

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

Build failure on deps=high is normal AFAIK. 👍

@chalasr
Copy link
Member

ping deciders

@fabpot
Copy link
Member

Thank you@lepiaf.

@fabpotfabpot merged commit74c951f intosymfony:3.4Jul 6, 2017
fabpot added a commit that referenced this pull requestJul 6, 2017
…er pass (lepiaf)This PR was merged into the 3.4 branch.Discussion----------[FrameworkBundle][Translation] Move translation compiler pass| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets | part of#21284| License       | MIT| Doc PR        | n/amove TranslationDumperPass, TranslationExtractorPass, TranslatorPass to Translation component.Commits-------74c951f [FrameworkBundle][Translation] Move translation compiler pass
This was referencedOct 18, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof requested changes

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@lepiaf@chalasr@xabbuh@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp