Skip to content

Commit 0a6dd0d

Browse files
authored
Merge pull request #39 from Toflar/hotfix/3.0.1
2 parents fe22805 + 4451647 commit 0a6dd0d

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/Psr6Store.php

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,21 @@
1616
use Psr\Cache\CacheItemInterface;
1717
use Psr\Cache\InvalidArgumentException as CacheInvalidArgumentException;
1818
use Symfony\Component\Cache\Adapter\AdapterInterface;
19-
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
2019
use Symfony\Component\Cache\Adapter\FilesystemTagAwareAdapter;
21-
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
2220
use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface;
2321
use Symfony\Component\Cache\PruneableInterface;
2422
use Symfony\Component\HttpFoundation\BinaryFileResponse;
2523
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
2624
use Symfony\Component\HttpFoundation\File\File;
2725
use Symfony\Component\HttpFoundation\Request;
2826
use Symfony\Component\HttpFoundation\Response;
29-
use Symfony\Component\Lock\BlockingStoreInterface;
3027
use Symfony\Component\Lock\Exception\InvalidArgumentException as LockInvalidArgumentException;
3128
use Symfony\Component\Lock\Exception\LockReleasingException;
3229
use Symfony\Component\Lock\LockFactory;
3330
use Symfony\Component\Lock\LockInterface;
31+
use Symfony\Component\Lock\PersistingStoreInterface;
3432
use Symfony\Component\Lock\Store\FlockStore;
3533
use Symfony\Component\Lock\Store\SemaphoreStore;
36-
use Symfony\Component\Lock\PersistingStoreInterface;
3734
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
3835
use Symfony\Component\OptionsResolver\Options;
3936
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -96,14 +93,7 @@ public function __construct(array $options = [])
9693
throw new MissingOptionsException('The cache_directory option is required unless you set the cache explicitly');
9794
}
9895

99-
// As of Symfony 4.3+ we can use the optimized FilesystemTagAwareAdapter
100-
if (class_exists(FilesystemTagAwareAdapter::class)) {
101-
return new FilesystemTagAwareAdapter('', 0, $options['cache_directory']);
102-
}
103-
104-
return new TagAwareAdapter(
105-
new FilesystemAdapter('', 0, $options['cache_directory'])
106-
);
96+
return new FilesystemTagAwareAdapter('', 0, $options['cache_directory']);
10797
})->setAllowedTypes('cache', AdapterInterface::class);
10898

10999
$resolver->setDefault('lock_factory', function (Options $options) {
@@ -392,9 +382,6 @@ public function clear(): void
392382
}
393383
}
394384

395-
/**
396-
* @internal Do not use in public code, this is for unit testing purposes only
397-
*/
398385
public function getCacheKey(Request $request): string
399386
{
400387
// Strip scheme to treat https and http the same

0 commit comments

Comments
 (0)