Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chalasr commentedJan 23, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
64a0100 to2056aaaCompareDeamon commentedJan 23, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@chalasr, it's a pleasure :) I pushed again but it fails, I might need to update a constraint in a composer.json file somewhere maybe this one : |
chalasr commentedJan 23, 2017
@Deamon It fails because of:
This trait is part of the DI component since 3.2, so what is needed is to add
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. |
e4f886d toe9941f1Compare| useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass; | ||
| useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass; | ||
| useSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ValidateWorkflowsPass; | ||
| useSymfony\Component\Config\DependencyInjection\Compiler\ConfigCachePass; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
e9941f1 to0c69d9cComparechalasr commentedFeb 16, 2017
@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 Would you mind rebasing this and make the change? |
Deamon commentedFeb 17, 2017
@chalasr I'll do that ASAP |
728ad3e to4ce7db9CompareDeamon commentedFeb 26, 2017
@chalasr, PR rebased and updated with a constructor inspired from other PR and your suggestions. |
chalasr left a comment
There was a problem hiding this 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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
4ce7db9 tob0c76b9Comparexabbuh commentedFeb 27, 2017
👍 Status: Reviewed |
| publicfunctionprocess(ContainerBuilder$container) | ||
| { | ||
| $resourceCheckers =$this->findAndSortTaggedServices('config_cache.resource_checker',$container); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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;
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
9dc062b to1c3afb7CompareDeamon commentedFeb 27, 2017
@chalasr everything has been corrected. |
1c3afb7 tobce445fCompare
chalasr left a comment
There was a problem hiding this 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 commentedFeb 28, 2017
Thank you@Deamon. |
…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
This MR is part of the#21284 todo list