From ae7b81c6c9455ebdba5748db41e05a2787d1ccb2 Mon Sep 17 00:00:00 2001 From: Marc Bennewitz Date: Sat, 5 Nov 2016 21:33:35 +0100 Subject: [PATCH 1/3] Deprecated capability "expiredRead" This capability does not make sense as it was previusly for informing that items if a storage adapter can be read if the TTL will be increased or set to infinity but this only works on storage adapters with capability "static_ttl" and increasing the TTL on the same time means that the item is no longer expired. So it's basically providing the same information as "static_ttl" but from a wrong PoV. The capability is now returning the information provided by "static_ttl" and will trigger a E_USER_DEPRECATED message. --- doc/book/storage/adapter.md | 32 ++++++++-------------- doc/book/storage/capabilities.md | 4 +++ src/Storage/Adapter/AbstractZendServer.php | 1 - src/Storage/Adapter/Apc.php | 1 - src/Storage/Adapter/Apcu.php | 1 - src/Storage/Adapter/Filesystem.php | 1 - src/Storage/Adapter/Memcache.php | 1 - src/Storage/Adapter/Memcached.php | 1 - src/Storage/Adapter/Memory.php | 1 - src/Storage/Adapter/Redis.php | 1 - src/Storage/Adapter/WinCache.php | 1 - src/Storage/Adapter/XCache.php | 1 - src/Storage/Capabilities.php | 26 ++++++++++-------- test/Storage/Adapter/CommonAdapterTest.php | 6 ++-- 14 files changed, 31 insertions(+), 47 deletions(-) diff --git a/doc/book/storage/adapter.md b/doc/book/storage/adapter.md index 1371208eb..37279d9aa 100644 --- a/doc/book/storage/adapter.md +++ b/doc/book/storage/adapter.md @@ -550,7 +550,6 @@ Capability | Value `staticTtl` | `true` `ttlPrecision` | 1 `useRequestTime` | value of `apc.use_request_time` from `php.ini` -`expiredRead` | `false` `maxKeyLength` | 5182 `namespaceIsPrefix` | `true` `namespaceSeparator` | Option value of `namespace_separator` @@ -631,7 +630,6 @@ Capability | Value `staticTtl` | `false` `ttlPrecision` | 1 `useRequestTime` | `false` -`expiredRead` | `true` `maxKeyLength` | 251 `namespaceIsPrefix` | `true` `namespaceSeparator` | Option value of `namespace_separator` @@ -676,7 +674,6 @@ Capability | Value `staticTtl` | `true` `ttlPrecision` | 1 `useRequestTime` | `false` -`expiredRead` | `false` `maxKeyLength` | 255 `namespaceIsPrefix` | `true` `namespaceSeparator` | none @@ -709,7 +706,6 @@ Capability | Value `staticTtl` | `true` `ttlPrecision` | 1 `useRequestTime` | `false` -`expiredRead` | `false` `maxKeyLength` | 255 `namespaceIsPrefix` | `true` `namespaceSeparator` | none @@ -759,7 +755,6 @@ Capability | Value `staticTtl` | `false` `ttlPrecision` | 0.05 `useRequestTime` | `false` -`expiredRead` | `true` `maxKeyLength` | 0 `namespaceIsPrefix` | `false` @@ -796,18 +791,17 @@ This adapter implements the following interfaces: ### Capabilities -Capability Value -supportedDatatypes null, boolean, integer, double, string, array -supportedMetadata _id -minTtl 0 -maxTtl 0 -staticTtl true -ttlPrecision 1 -useRequestTime false -expiredRead false -maxKeyLength 255 -namespaceIsPrefix true -namespaceSeparator