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

Skip to content

[Cache] Make Redis initializers static #38567

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

Merged
merged 1 commit into from
Oct 14, 2020
Merged

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Oct 14, 2020

Q A
Branch? 4.4
Bug fix? yes .. or maybe?
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

I am on very thin ice now. I saw a comment on similar code here: #38563 (comment)

These anonymous functions in the cache component could also be made static to avoid being connected to the object using the Redis trait.

Feel free to correct me if this does not make much sense.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

This is pure CS, because the closures are found in a static method, so they are static already. But fine to me, this is clearer.

@Nyholm
Copy link
Member Author

Nyholm commented Oct 14, 2020

This is pure CS, because the closures are found in a static method, so they are static already

Okey. I didn't think about that. I thought it was strange that these weren't static already.

Thank you for the info.

@fabpot
Copy link
Member

fabpot commented Oct 14, 2020

Thank you @Nyholm.

@fabpot fabpot merged commit a590e90 into symfony:4.4 Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants