Skip to content

[Cache] Add optional ClockInterface to ArrayAdapter #57836

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
Jul 26, 2024
Merged

[Cache] Add optional ClockInterface to ArrayAdapter #57836

merged 1 commit into from
Jul 26, 2024

Conversation

jasiolpn
Copy link
Contributor

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues none
License MIT

Hello.
It is common to use ArrayAdapter as a cache adapter in test environments. Unfortunately, currently cache item expiration is untestable. On the other hand, Psr\Clock\ClockInterface and Symfony Clock component are available for some time. I think it would be great if we make use of ClockInterface in ArrayAdapter.

@carsonbot

This comment was marked as resolved.

@jasiolpn jasiolpn changed the title Added ClockInterface to ArrayAdapter [CACHE] Added ClockInterface to ArrayAdapter Jul 26, 2024
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.

Nice idea, here are some comments.

@nicolas-grekas nicolas-grekas changed the title [CACHE] Added ClockInterface to ArrayAdapter [Cache] Add ClockInterface to ArrayAdapter Jul 26, 2024
@nicolas-grekas nicolas-grekas changed the title [Cache] Add ClockInterface to ArrayAdapter [Cache] Add optional ClockInterface to ArrayAdapter Jul 26, 2024
Copy link
Member

@derrabus derrabus left a comment

Choose a reason for hiding this comment

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

Nice change.

@derrabus
Copy link
Member

Thank you @jasiolpn.

@derrabus derrabus merged commit b360af7 into symfony:7.2 Jul 26, 2024
5 of 10 checks passed
@jasiolpn jasiolpn deleted the array-adapter-clock-aware branch July 26, 2024 11:54
@OskarStark OskarStark changed the title [Cache] Add optional ClockInterface to ArrayAdapter [Cache] Add optional ClockInterface to ArrayAdapter Aug 7, 2024
@fabpot fabpot mentioned this pull request Oct 27, 2024
@armetiz
Copy link
Contributor

armetiz commented Apr 16, 2025

Hi there,
Why hasn't this been ported to 6.4?

Regards

@stof
Copy link
Member

stof commented Apr 16, 2025

Because new features are never ported to patch releases of older versions (they are not bug fixes)

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.

7 participants