This also removes capability event and the marker object. Capabilities are meant to be read-only and thus won't change after retrieval via StorageInterface#getCapabilties. By having the event deleted, there is no need to have the adapter injected, though we also removed Capabilities#getAdapter and the StorageInterface constructor argument.
By refactoring the Serializer plugin, which already replaced the initial instance of Capabilities, we were able to drop the base capabilities feature as well.
Final result is that we now provide all capabilities as public read-only properties which reflect their defaults which were previously handled via internal $default magic in Capabilties#getCapability.
Along all the refactoring, some capabilities have changed or were removed while respecting ideas of #8 which was around since 2016:
staticTtl got removed without a replacement. It outlined if the cache backend is handling cache expiry or if the implementation is taking care of it. Though it might be interesting for picking a specific backend, that is rather not of interest at runtime for upstream projects.
lockOnExpire got removed without a replacement. Was only used in zend-server adapter which is already abandoned since 2022
minTtl got renamed to ttlSupported and its type changed from int to bool
maxTtl got removed without a replacement. Every cache backend which is supported by laminas right now does allow TTLs being an infinite amount of seconds (where maximum int range is the limit, depending on the CPU architecture). There was a backend XCache where a limit existed but that backend was abandoned in 2021.
useRequestTime was renamed to usesRequestTime
namespaceSeparator got removed without a replacement. It was reflecting the option value and this the storage options can be used instead.
Description
This also removes
capability
event and themarker
object. Capabilities are meant to be read-only and thus won't change after retrieval viaStorageInterface#getCapabilties
. By having the event deleted, there is no need to have the adapter injected, though we also removedCapabilities#getAdapter
and theStorageInterface
constructor argument.By refactoring the
Serializer
plugin, which already replaced the initial instance ofCapabilities
, we were able to drop thebase capabilities
feature as well.Final result is that we now provide all capabilities as public
read-only
properties which reflect their defaults which were previously handled via internal$default
magic inCapabilties#getCapability
.Along all the refactoring, some capabilities have changed or were removed while respecting ideas of #8 which was around since 2016:
staticTtl
got removed without a replacement. It outlined if the cache backend is handling cache expiry or if the implementation is taking care of it. Though it might be interesting for picking a specific backend, that is rather not of interest at runtime for upstream projects.lockOnExpire
got removed without a replacement. Was only used in zend-server adapter which is already abandoned since 2022minTtl
got renamed tottlSupported
and its type changed fromint
tobool
maxTtl
got removed without a replacement. Every cache backend which is supported by laminas right now does allow TTLs being an infinite amount of seconds (where maximumint
range is the limit, depending on the CPU architecture). There was a backendXCache
where a limit existed but that backend was abandoned in 2021.useRequestTime
was renamed tousesRequestTime
namespaceSeparator
got removed without a replacement. It was reflecting the option value and this the storage options can be used instead.closes #8