Skip to content

Commit decb0bc

Browse files
committed
Merge pull request #6 from Nyholm/hierarchy
Bumped versions of taggable
2 parents c5b72a4 + 363fec2 commit decb0bc

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{
2929
"php": "^5.5|^7.0",
3030
"psr/cache": "1.0.0",
31-
"cache/taggable-cache": "^0.2"
31+
"cache/taggable-cache": "^0.2|^0.3"
3232
},
3333
"require-dev":
3434
{

src/AbstractCachePool.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ abstract class AbstractCachePool implements CacheItemPoolInterface, TaggablePool
2626
{
2727
use TaggablePoolTrait;
2828

29-
/**
30-
* List of invalid (or reserved) key characters.
31-
*
32-
* @type string
33-
*/
34-
const KEY_INVALID_CHARACTERS = '{}()/\@:';
35-
3629
/**
3730
* @type CacheItemInterface[] deferred
3831
*/
@@ -245,12 +238,10 @@ protected function validateKey($key)
245238
));
246239
}
247240

248-
$invalid = preg_quote(static::KEY_INVALID_CHARACTERS, '|');
249-
if (preg_match('|['.$invalid.']|', $key)) {
241+
if (preg_match('|[\{\}\(\)/\\@\:]|', $key)) {
250242
throw new InvalidArgumentException(sprintf(
251-
'Invalid key: "%s". The key contains one or more characters reserved for future extension: %s',
252-
$key,
253-
static::KEY_INVALID_CHARACTERS
243+
'Invalid key: "%s". The key contains one or more characters reserved for future extension: {}()/\@:',
244+
$key
254245
));
255246
}
256247
}

0 commit comments

Comments
 (0)