File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
DependencyInjection/Compiler Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 14
14
use GraphQL \Executor \Promise \PromiseAdapter ;
15
15
use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
16
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
17
+ use Symfony \Component \HttpKernel \Kernel ;
17
18
18
19
class AutowiringTypesPass implements CompilerPassInterface
19
20
{
@@ -24,6 +25,9 @@ class AutowiringTypesPass implements CompilerPassInterface
24
25
*/
25
26
public function process (ContainerBuilder $ container )
26
27
{
27
- $ container ->findDefinition ('overblog_graphql.promise_adapter ' )->setAutowiringTypes ([PromiseAdapter::class]);
28
+ version_compare (Kernel::VERSION , '3.3.0 ' , '>= ' ) ?
29
+ $ container ->setAlias (PromiseAdapter::class, 'overblog_graphql.promise_adapter ' ) :
30
+ $ container ->findDefinition ('overblog_graphql.promise_adapter ' )->setAutowiringTypes ([PromiseAdapter::class])
31
+ ;
28
32
}
29
33
}
You can’t perform that action at this time.
0 commit comments