When we inject a ServiceLocator, the extension does not understand that. It thinks it's the full container, but it's not. It's a specialed container. I made a full reproducer: https://github.com/lyrixx/test/commit/e172840d514a00c3ed8667e828a4197a3028c782#r154945352 (ref https://github.com/symfony/symfony/pull/60096#issuecomment-2782785035)