-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #448 from jackalope/cache-psr16-compatible
Fix PSR16 cache support: sanitize all non-guaranteed characters in key
- Loading branch information
Showing
6 changed files
with
62 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/Jackalope/Transport/DoctrineDBAL/CachedClientFunctionalTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Jackalope\Transport\DoctrineDBAL; | ||
|
||
use Doctrine\DBAL\Connection; | ||
use Jackalope\Factory; | ||
use Symfony\Component\Cache\Adapter\ArrayAdapter; | ||
use Symfony\Component\Cache\Psr16Cache; | ||
|
||
class CachedClientFunctionalTest extends ClientTest | ||
{ | ||
protected function getClient(Connection $conn) | ||
{ | ||
$nodeCacheAdapter = new ArrayAdapter(); | ||
$nodeCache = new Psr16Cache($nodeCacheAdapter); | ||
|
||
$metaCacheAdapter = new ArrayAdapter(); | ||
$metaCache = new Psr16Cache($metaCacheAdapter); | ||
|
||
return new CachedClient(new Factory(), $conn, [ | ||
'nodes' => $nodeCache, | ||
'meta' => $metaCache, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters