Skip to content

Conversation

@datamweb
Copy link
Contributor

@datamweb datamweb commented Jan 8, 2026

Description
The method has already been implemented in BaseHandler and is therefore
available on all built-in cache handlers. Exposing it on the interface
improves IDE support and allows consumers to safely rely on the method
when type-hinting against CacheInterface.

Screenshot 2026-01-08 111152

See: #4107 (comment)

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan added breaking change Pull requests that may break existing functionalities 4.7 labels Jan 8, 2026

- **Cache:** The ``CacheInterface`` now includes the ``deleteMatching()`` method. If you've implemented your own caching driver from scratch, you will need to provide an implementation for this method to ensure compatibility.
- **Images:** The ``ImageHandlerInterface`` now includes a new method: ``clearMetadata()``. If you've implemented your own handler from scratch, you will need to provide an implementation for this method to ensure compatibility.
- **Cache:** The ``CacheInterface`` now includes the ``remember()`` method. All built-in cache handlers inherit this method via ``BaseHandler``, so no changes are required for them. If you have implemented your own caching driver directly from ``CacheInterface``, you will need to provide an implementation for ``remember()`` to maintain compatibility.
Copy link
Member

Choose a reason for hiding this comment

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

Please move this up to maintain alphabetical order.

* @param int $ttl Time To Live, in seconds
* @param Closure(): mixed $callback Callback executed on cache miss
*/
public function remember(string $key, int $ttl, Closure $callback): mixed;
Copy link
Member

Choose a reason for hiding this comment

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

Please update BaseHandler::remember() to remove the redundant PHPDocs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.7 breaking change Pull requests that may break existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants