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][Config] Move ConfigCachePass from FrameworkBundle to Config#21375

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:masterfromDeamon:move-config-cache-pass
Feb 28, 2017

Conversation

@Deamon
Copy link
Contributor

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

This MR is part of the#21284 todo list

@chalasr
Copy link
Member

chalasr commentedJan 23, 2017
edited
Loading

Thanks for working on this@Deamon. Tests were broken before this PR, they have been fixed meantime, could you rebase against master so we could see if builds are green?

Also I suggest to wait that at least one of the opened PRs on this subject is merged before moving the remaining passes of the todo list, the goal has been validated by maintainers but the approach might still be challenged, it would be too bad to rework several PRs in this case.

@DeamonDeamonforce-pushed themove-config-cache-pass branch from64a0100 to2056aaaCompareJanuary 23, 2017 11:51
@Deamon
Copy link
ContributorAuthor

Deamon commentedJan 23, 2017
edited
Loading

@chalasr, it's a pleasure :)
And as you suggested, I'll wait to continue other changes. I understand that the approach still in discussion.

I pushed again but it fails, I might need to update a constraint in a composer.json file somewhere maybe this one :src/Symfony/Component/DependencyInjection/composer.json line 33 and maybe a conflict in the same file ?

@chalasr
Copy link
Member

@Deamon It fails because of:

Fatal error: Trait 'Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait' not found in /home/travis/build/symfony/symfony/src/Symfony/Component/Config/DependencyInjection/ConfigCachePass.php

This trait is part of the DI component since 3.2, so what is needed is to add"symfony/dependency-injection": "~3.2" as dev requirement in the Config composer.json, sort as the trait exists even with low deps.

maybe a conflict in the same file

Since it must be ok to use the DI component along with the Config one without using the compiler pass introduced here, this one should not involve any conflict AFAIK.

useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass;
useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass;
useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ValidateWorkflowsPass;
useSymfony\Component\Config\DependencyInjection\Compiler\ConfigCachePass;
Copy link
Member

Choose a reason for hiding this comment

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

Should beSymfony\Component\Config\DependencyInjection\ConfigCachePass, right?

Copy link
ContributorAuthor

@DeamonDeamonJan 23, 2017
edited
Loading

Choose a reason for hiding this comment

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

indeed,
thanks for the review!

@chalasr
Copy link
Member

@daemon The existing PRs regarding the same ticket have been merged, we are now sure about the right approach: add a constructor to the moved compiler pass (the new one) taking the service id in which collected services are injected as argument defaulting to the service id used in the framework (here$factoryServiceId = 'config_cache_factory') and the collected tag(s) as other arguments defaulting to their name in the framework (here$resourceCheckerTag = 'config_cache.resource_checker'), see merged PRs for inspiration.

Would you mind rebasing this and make the change?

@Deamon
Copy link
ContributorAuthor

@chalasr I'll do that ASAP

@DeamonDeamonforce-pushed themove-config-cache-pass branch 3 times, most recently from728ad3e to4ce7db9CompareFebruary 26, 2017 19:10
@Deamon
Copy link
ContributorAuthor

@chalasr, PR rebased and updated with a constructor inspired from other PR and your suggestions.

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.

LGTM 👍

"php":">=5.5.9",
"symfony/filesystem":"~2.8|~3.0"
"symfony/filesystem":"~2.8|~3.0",
"symfony/dependency-injection":"~3.2"
Copy link
Member

Choose a reason for hiding this comment

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

IMO that's not a hard dependency as the Config component itself does not require the DependencyInjection component to be installed.

Copy link
Member

Choose a reason for hiding this comment

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

indeed, only a dev requirement.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I put this in require because we use the "PriorityTaggedServiceTrait" from DependencyInjectionhere.

I add it to make tests passes on PHP7.1 (travis job).

If it needs to be in require-dev even with this, I change it.

Copy link
Member

Choose a reason for hiding this comment

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

We can skip tests when the trait is not available. And we should probably add a conflict rule for versions of the DependencyInjection component before 3.2.

Copy link
Member

Choose a reason for hiding this comment

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

@xabbuh are you sure for the conflict? People can use DI but not the pass

Copy link
Member

Choose a reason for hiding this comment

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

That's true, but it will then lead to errors when you decide to use the pass and didn't update the DI version before.

Copy link
Member

Choose a reason for hiding this comment

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

Ok I wasn't sure that it's more important than broad compatibility. Fixed it for existing passes in#21779.

We can skip tests when the trait is not available

Adding the conflict avoids the need for skipping tests.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

ok I'll push in a minute the require in dev and the conflict section

@xabbuh
Copy link
Member

👍

Status: Reviewed


publicfunctionprocess(ContainerBuilder$container)
{
$resourceCheckers =$this->findAndSortTaggedServices('config_cache.resource_checker',$container);
Copy link
Member

Choose a reason for hiding this comment

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

'config_cache.resource_checker' should be$this->resourceCheckerTag

return;
}

$container->getDefinition('config_cache_factory')->replaceArgument(0,$resourceCheckers);
Copy link
Member

@chalasrchalasrFeb 27, 2017
edited
Loading

Choose a reason for hiding this comment

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

'config_cache_factory' should be$this->factoryServiceId

useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass;
useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass;
useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ValidateWorkflowsPass;
useSymfony\Component\Config\DependencyInjection\Compiler\ConfigCachePass;
Copy link
Member

Choose a reason for hiding this comment

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

should beSymfony\Component\Config\DependencyInjection\ConfigCachePass

* file that was distributed with this source code.
*/

namespaceSymfony\Component\Config\Tests\DependencyInjection\Compiler;
Copy link
Member

Choose a reason for hiding this comment

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

should beSymfony\Component\Config\Tests\DependencyInjection;

fabpot added a commit that referenced this pull requestFeb 27, 2017
This PR was merged into the 3.3-dev branch.Discussion----------[Form][Serializer] Add missing conflicts for DI| Q             | A| ------------- | ---| Branch?       | master| Tests pass?   | yes| Fixed tickets |#21375 (comment)| License       | MITThey make use of `PriorityTaggedServiceTrait` which is available since 3.2 onlyCommits-------ddae4ef [Form][Serializer] Add missing conflicts for DI
@DeamonDeamonforce-pushed themove-config-cache-pass branch 2 times, most recently from9dc062b to1c3afb7CompareFebruary 27, 2017 21:09
@Deamon
Copy link
ContributorAuthor

@chalasr everything has been corrected.
Travis do not pass for HHVM apparently due to timeout, is there a way to restart the failing test ?

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

@fabpot
Copy link
Member

Thank you@Deamon.

@fabpotfabpot merged commitbce445f intosymfony:masterFeb 28, 2017
fabpot added a commit that referenced this pull requestFeb 28, 2017
…ameworkBundle to Config (Deamon)This PR was merged into the 3.3-dev branch.Discussion----------[FrameworkBundle][Config] Move ConfigCachePass from FrameworkBundle to Config| Q             | A| ------------- | ---| Branch?       | master<!--see comment below-->| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes/no| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | <!--highly recommended for new features-->This MR is part of the#21284 todo list<!--- Bug fixes must be submitted against the lowest branch where they apply  (lowest branches are regularly merged to upper ones so they get the fixes too).- Features and deprecations must be submitted against the master branch.- Please fill in this template according to the PR you're about to submit.- Replace this comment by a description of what your PR is solving.-->Commits-------bce445f Move ConfigCachePass from FrameworkBundle to Config
@fabpotfabpot mentioned this pull requestMay 1, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

6 participants

@Deamon@chalasr@xabbuh@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp