diff --git a/src/DependencyInjection/Compiler/IdentifyCallbackServiceIdsPass.php b/src/DependencyInjection/Compiler/IdentifyCallbackServiceIdsPass.php index 6330872ee..e7645ab0b 100644 --- a/src/DependencyInjection/Compiler/IdentifyCallbackServiceIdsPass.php +++ b/src/DependencyInjection/Compiler/IdentifyCallbackServiceIdsPass.php @@ -52,6 +52,9 @@ private function resolveServiceIdAndMethod(ContainerBuilder $container, ?array & return; } [$id, $method] = explode('::', $callback['function'], 2) + [null, null]; + if (str_starts_with($id, '\\')) { + $id = ltrim($id, '\\'); + } try { $definition = $container->getDefinition($id); diff --git a/tests/Functional/App/config/connection/mapping/connection.types.yaml b/tests/Functional/App/config/connection/mapping/connection.types.yaml index a9fc05ea8..565e083d0 100644 --- a/tests/Functional/App/config/connection/mapping/connection.types.yaml +++ b/tests/Functional/App/config/connection/mapping/connection.types.yaml @@ -25,7 +25,7 @@ User: friendsBackward: type: userConnection argsBuilder: "Relay::BackwardConnection" - resolver: 'overblog_graphql.test.resolver.node::friendsResolver' + resolver: '\Overblog\GraphQLBundle\Tests\Functional\App\Resolver\ConnectionResolver::friendsResolver' friendConnection: type: relay-connection