We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 276be2e commit 8ab1f92Copy full SHA for 8ab1f92
tests/lib/Acceptance/TestCase.php
@@ -42,8 +42,14 @@ protected function setUp(): void
42
43
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
44
45
+ // @TODO can simplify this when only supporting laravel-json-api/eloquent:^2.0
46
$this->app->singleton(SchemaContainerContract::class, static function ($container) {
- $resolver = new ContainerResolver(static fn() => $container);
47
+ if (class_exists(ContainerResolver::class)) {
48
+ $resolver = new ContainerResolver(static fn() => $container);
49
+ } else {
50
+ $resolver = $container;
51
+ }
52
+
53
return new SchemaContainer($resolver, $container->make(Server::class), [
54
PostSchema::class,
55
]);
0 commit comments