Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"illuminate/support": "^5.7|^6.0",
"illuminate/cache": "^5.7|^6.0",
"symfony/psr-http-message-bridge": "^1",
"zendframework/zend-diactoros": "^1.8.6"
"zendframework/zend-diactoros": "^1.8.6",
"symfony/cache": "^4.3 || ^5"
},
"require-dev": {
"orchestra/testbench": "^3.7.7 || ^4",
Expand Down
7 changes: 5 additions & 2 deletions src/Providers/GraphQLiteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Illuminate\Contracts\Auth\Access\Gate;
use Illuminate\Contracts\Auth\Factory as AuthFactory;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
use Symfony\Component\Cache\Psr16Cache;
use TheCodingMachine\GraphQLite\Context\Context;
use TheCodingMachine\GraphQLite\Exceptions\WebonyxErrorHandler;
use TheCodingMachine\GraphQLite\Laravel\Mappers\Parameters\ValidateFieldMiddleware;
Expand Down Expand Up @@ -79,9 +82,9 @@ public function register()

$this->app->singleton('graphqliteCache', static function () {
if (extension_loaded('apcu') && ini_get('apc.enabled')) {
return new \Symfony\Component\Cache\Simple\ApcuCache();
return new Psr16Cache(new ApcuAdapter());
} else {
return new \Symfony\Component\Cache\Simple\PhpFilesCache();
return new Psr16Cache(new PhpFilesAdapter());
}
});

Expand Down