-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[FrameworkBundle] Moving Cache-related CompilerPass to Cache component #27770
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
[FrameworkBundle] Moving Cache-related CompilerPass to Cache component #27770
Conversation
|
This requires adding |
0d7635d to
75a38fc
Compare
|
|
||
| $translatorClass = $container->getParameterBag()->resolveValue($container->findDefinition('translator')->getClass()); | ||
|
|
||
| if (!is_subclass_of($translatorClass, 'Symfony\Component\Translation\TranslatorBagInterface')) { |
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.
Could take the opportunity to use TranslatorBagInterface::class
| /** | ||
| * @author Abdellatif Ait boudad <[email protected]> | ||
| */ | ||
| class TranslationLoggingPass implements CompilerPassInterface |
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.
Keeping it named LoggingTranslatorPass would be more consistent with Symfony\Component\Translation\LoggingTranslator
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 tried to be consistant with other CompilerPass that were already in Translation/DependencyInjection, I can move back to the old name if preferred .
|
@Korbeil you also need to remove theses line: https://github.com/symfony/symfony/blob/master/.github/CODEOWNERS#L25-L26 |
3e3cbff to
3cf69f8
Compare
3b4e4d7 to
7c57468
Compare
|
After quick talk with @nicolas-grekas I choosed to split this PR for each component Now this one contains only moved CompilerPass for Cache component. |
e619abd to
1c8c114
Compare
3dab36d to
28703e5
Compare
1bfe564 to
977f17d
Compare
530ed5d to
ce556cc
Compare
|
Hi @nicolas-grekas, anymore work to do here? |
| @@ -9,15 +9,15 @@ | |||
| * file that was distributed with this source code. | |||
| */ | |||
|
|
|||
| namespace Symfony\Bundle\FrameworkBundle\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.
The old test must be kept and marked as @legacy until the deprecated class is removed (same for all passes moved here)
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.
Just reverted old tests, for @legacy you want it on all tests ?
Is it also needed on passes since we have the @deprecated tag ?
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.
it's @group legacy on the test classes
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 be okay, tell me if I forgot something.
d14b867 to
95f87a5
Compare
| /** | ||
| * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException | ||
| * @expectedExceptionMessage Class "Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\NotFound" used for service "pool.not-found" cannot be found. | ||
| * @expectedExceptionMessage Class "Symfony\Component\Cache\Tests\DependencyInjection\NotFound" used for service "pool.not-found" cannot be found. |
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 be reverted
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.
Was checking tests and just saw that, sorry :/
95f87a5 to
2a81bdb
Compare
2a81bdb to
53e7040
Compare
|
Thank you @Korbeil. |
β¦ Cache component (Korbeil) This PR was merged into the 4.2-dev branch. Discussion ---------- [FrameworkBundle] Moving Cache-related CompilerPass to Cache component | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Hi, first PR here π This is related to #27479 and a first work to move Cache-related CompilerPass out of `FrameworkBundle`, it allows to decouple part of the FrameworkBundle configuration classes. Since we didn't choosed a fixed directory organization to manage theses, I actually did same as in Bundles and used DependencyInjection folder. If we do choose to follow my [last comment directory organization proposal](#27479 (comment)), I'll move theses CompilerPass to `Framework/DependencyInjection/Compiler` directory (nothing hard here). Thanks to @DanieleGBX that helped me checking this PR and gave me some good advices ! Here is a list of all CompilerPass I moved, with related component (I also moved related tests when they were present): - **Cache** - CacheCollectorPass - **Cache** - CachePoolClearerPass - **Cache** - CachePoolPass - **Cache** - CachePoolPrunerPass Commits ------- 53e7040 moving Cache-related compiler pass from FrameworkBundle to Cache component
Hi, first PR here π
This is related to #27479 and a first work to move Cache-related CompilerPass out of
FrameworkBundle, it allows to decouple part of the FrameworkBundle configuration classes.Since we didn't choosed a fixed directory organization to manage theses, I actually did same as in Bundles and used DependencyInjection folder. If we do choose to follow my last comment directory organization proposal, I'll move theses CompilerPass to
Framework/DependencyInjection/Compilerdirectory (nothing hard here).Thanks to @DanieleGBX that helped me checking this PR and gave me some good advices !
Here is a list of all CompilerPass I moved, with related component (I also moved related tests when they were present):