Skip to content

Commit 21a5fae

Browse files
committed
fix(di): wire response_type_class only if configured
1 parent a00a941 commit 21a5fae

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/DependencyInjection/LeagueOAuth2ServerExtension.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,11 @@ private function configureAuthorizationServer(ContainerBuilder $container, array
126126
$config['private_key'],
127127
$config['private_key_passphrase'],
128128
false,
129-
]))
130-
->replaceArgument(5, new Reference($config['response_type_class']));
129+
]));
130+
131+
if ($config['response_type_class']) {
132+
$authorizationServer->replaceArgument(5, new Reference($config['response_type_class']));
133+
}
131134

132135
if ($config['enable_client_credentials_grant']) {
133136
$authorizationServer->addMethodCall('enableGrantType', [

0 commit comments

Comments
 (0)