Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Cache] CachePoolPrunerPass uses wrong service id in 3.4 #27134

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

Closed
DemonTPx opened this issue May 3, 2018 · 4 comments
Closed

[Cache] CachePoolPrunerPass uses wrong service id in 3.4 #27134

DemonTPx opened this issue May 3, 2018 · 4 comments

Comments

@DemonTPx
Copy link
Contributor

DemonTPx commented May 3, 2018

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.4.9

I was running the cache:pool:prune command and nothing was pruned. I discovered that no pools were added to the command even though I have about 6 of them in my application.

The CachePoolPrunerPass is responsible for adding the pools to the command, but uses the class name of the command to find its service. This might be fine for Symfony 4, but in my 3.4 application it cannot find the service. After I changed the service id to console.command.cache_pool_prune the compiler pass worked correctly again and I could prune my cache pools.

I could make a PR for this, but I think it might break it on Symfony 4. What would be the best way to proceed with this?

@xabbuh
Copy link
Member

xabbuh commented May 3, 2018

@DemonTPx please do :) (it looks like this broke in #24713)

@xabbuh
Copy link
Member

xabbuh commented May 3, 2018

@xabbuh
Copy link
Member

xabbuh commented May 3, 2018

to add another PR that provides some context: the service id was indeed removed at some point but it was added back in #25011

@DemonTPx
Copy link
Contributor Author

DemonTPx commented May 3, 2018

Thanks for the extra context. I just checked one of my projects using Symfony 4 and it has the same problem, as you pointed out. I'll work on a PR :)

DemonTPx added a commit to PBWebMedia/symfony that referenced this issue May 3, 2018
DemonTPx added a commit to PBWebMedia/symfony that referenced this issue May 3, 2018
nicolas-grekas added a commit that referenced this issue May 3, 2018
…PruneCommand in its compiler pass (DemonTPx)

This PR was squashed before being merged into the 3.4 branch (closes #27135).

Discussion
----------

[FrameworkBundle] Use the correct service id for CachePoolPruneCommand in its compiler pass

… CachePoolPruneCommand in its compiler pass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27134    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

32c7ee3 [FrameworkBundle] Use the correct service id for CachePoolPruneCommand in its compiler pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants