Skip to content

Commit f3fe291

Browse files
committed
Merge branch 'hotfix/1.0.1'
2 parents fe93fc4 + 1597ab1 commit f3fe291

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ $ composer require toflar/psr6-symfony-http-cache-store
3535

3636
## Configuration
3737

38-
Use the `Psr6Store` by enabling it in your `AppCache` as follows:
38+
For the Symfony 3 standard edition file structure, use the `Psr6Store` by
39+
enabling it in your `AppCache` as follows:
3940

4041
```php
4142
<?php
@@ -57,6 +58,16 @@ Use the `Psr6Store` by enabling it in your `AppCache` as follows:
5758

5859
```
5960

61+
For the Symfony 4/Flex structure, you need to adjust your `index.php` like this:
62+
63+
```php
64+
<?php
65+
66+
// public/index.php
67+
$kernel = new Kernel($env, $debug);
68+
$kernel = new HttpCache($kernel, new Psr6Store(['cache_directory' => $kernel->getCacheDir()]));
69+
```
70+
6071
That's it, that's all there is to do. The `Psr6Store` will automatically
6172
create the best caching and locking adapters available for your local filesystem.
6273

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"require-dev": {
2020
"friendsofphp/php-cs-fixer": "^2.6",
21-
"phpunit/phpunit": "^5.7.25",
21+
"phpunit/phpunit": "^5.7.27",
2222
"satooshi/php-coveralls": "2.0.x-dev"
2323
},
2424
"autoload": {

src/Psr6Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function __construct(array $options = [])
120120
}
121121

122122
return new TagAwareAdapter(
123-
new FilesystemAdapter('fos-http-cache', 0, $options['cache_directory'])
123+
new FilesystemAdapter('http-cache-tags', 0, $options['cache_directory'])
124124
);
125125
})->setAllowedTypes('cache', AdapterInterface::class);
126126

0 commit comments

Comments
 (0)