Skip to content
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] remove messenger cache if not enabled #35334

Merged
merged 1 commit into from Jan 14, 2020

Conversation

@dmaicher
Copy link
Contributor

dmaicher commented Jan 14, 2020

Q A
Branch? 4.3
Bug fix? yes/no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

I noticed on one of my apps that I have a cache pool related to the symfony messenger integration although I'm not using the messenger at all.

bin/console debug:container cache.messenger.restart_workers_signal

Information for Service "cache.messenger.restart_workers_signal"
================================================================

 An adapter that collects data about all cache calls.

 ---------------- -------------------------------------------------- 
  Option           Value                                             
 ---------------- -------------------------------------------------- 
  Service ID       cache.messenger.restart_workers_signal            
  Class            Symfony\Component\Cache\Adapter\TraceableAdapter  
  Tags             cache.pool                                        
                   kernel.reset (method: reset)                      
  Public           no                                                
  Synthetic        no                                                
  Lazy             no                                                
  Shared           yes                                               
  Abstract         no                                                
  Autowired        no                                                
  Autoconfigured   no                                                
 ---------------- -----------------------------------------

So this PR removes the definition of the service in case the messenger integration is disabled.

@dmaicher dmaicher force-pushed the dmaicher:remove_messenger_cache branch from 73307d3 to 4809b50 Jan 14, 2020
@dmaicher

This comment has been minimized.

Copy link
Contributor Author

dmaicher commented Jan 14, 2020

Unfortunately I don't understand the travis build fail 😢 I cannot reproduce it locally yet Ok finally figured it out 😋

@dmaicher dmaicher force-pushed the dmaicher:remove_messenger_cache branch from 4809b50 to f81161d Jan 14, 2020
@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Jan 14, 2020
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Jan 14, 2020

Thank you @dmaicher.

nicolas-grekas added a commit that referenced this pull request Jan 14, 2020
…(dmaicher)

This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] remove messenger cache if not enabled

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes/no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

I noticed on one of my apps that I have a cache pool related to the symfony messenger integration although I'm not using the messenger at all.

```
bin/console debug:container cache.messenger.restart_workers_signal

Information for Service "cache.messenger.restart_workers_signal"
================================================================

 An adapter that collects data about all cache calls.

 ---------------- --------------------------------------------------
  Option           Value
 ---------------- --------------------------------------------------
  Service ID       cache.messenger.restart_workers_signal
  Class            Symfony\Component\Cache\Adapter\TraceableAdapter
  Tags             cache.pool
                   kernel.reset (method: reset)
  Public           no
  Synthetic        no
  Lazy             no
  Shared           yes
  Abstract         no
  Autowired        no
  Autoconfigured   no
 ---------------- -----------------------------------------
```

So this PR removes the definition of the service in case the messenger integration is disabled.

Commits
-------

f81161d [FrameworkBundle] remove messenger cache if not enabled
@nicolas-grekas nicolas-grekas merged commit f81161d into symfony:4.3 Jan 14, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details
@dmaicher dmaicher deleted the dmaicher:remove_messenger_cache branch Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.