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

Introduce MetadataCapableInterface #273

Merged
merged 3 commits into from
Aug 29, 2023

Conversation

boesing
Copy link
Member

@boesing boesing commented Aug 26, 2023

Q A
Documentation 51433fb
Bugfix no
BC Break yes
New Feature yes

Description

New Features

  • Every adapter which supports metadata now implements MetadataCapableInterface and provides a dedicated object containing all the metadata values it supports.

Breaking Changes

  • AbstractAdapter and StorageInterface are not aware of the methods getMetadata anymore. These were moved to the new MetadataCapableInterface
  • Capabilities do not provide supportedMetadata anymore. The supported metadata is tied to the used storage adapter and thus, was already requiring projects to explicitly know the exact implementation of the cache backend in case of using these metadatas anyway
  • KeyListIterator and the corresponding IteratorInterface does not provide the mode CURRENT_AS_METADATA anymore

Fixes #130

This also removes benchmarks which are so available in each adapter repository and thus were redundant.
Even tho, we are now unable to directly see impact on performance when changing `AbstractAdapter`, the adapters themselves keep track on performance due to renovate updating locks permanently.

Longterm, the `AbstractAdapter` will most likely be removed in favor of cache backend specific features explicitly implemented. The `StorageInterface` will extend the PSR interfaces and requires the adapters to serve these interfaces in their own way. Therefore, removing benchmarks might be a good thing since the `StorageInterface` is meant to be feature complete.

With laminas#130, some methods might be removed from the `StorageInterface` but extending that interface is not planned.

Signed-off-by: Maximilian Bösing <[email protected]>
This provides a way for storage adapters to provide properly typed metadata objects.

Signed-off-by: Maximilian Bösing <[email protected]>
@boesing boesing added this to the 4.0.0 milestone Aug 26, 2023
@boesing
Copy link
Member Author

boesing commented Aug 26, 2023

Contains changes of #272

Feature implementation: 6a08ab0

Copy link
Member Author

Choose a reason for hiding this comment

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

mostly copy & paste from AbstractAdapterTest

@boesing boesing linked an issue Aug 26, 2023 that may be closed by this pull request
@boesing boesing merged commit d5df2e2 into laminas:4.0.x Aug 29, 2023
12 of 13 checks passed
@boesing boesing deleted the feature/metadata-interface branch September 25, 2023 12:35
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.

[RFC]: Move StorageInterface::getMetadata to MetadataCapableInterface
1 participant