Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error "Nesting level too deep - recursive dependency?" #1631

Closed
odyswise opened this issue Jul 19, 2024 · 2 comments · Fixed by #1632
Closed

Fatal error "Nesting level too deep - recursive dependency?" #1631

odyswise opened this issue Jul 19, 2024 · 2 comments · Fixed by #1632

Comments

@odyswise
Copy link

Version 4.10.5
Error thows in AugmentTags.php on 50 line. For solving this error I added strict = true in array_search function call.

@DerManoMann
Copy link
Collaborator

I think I know what you mean. Would you have some sample annotations that trigger this issue so I can reproduce it?

@odyswise
Copy link
Author

odyswise commented Jul 19, 2024

Nelmio Bundle yaml settings:

areas: # to filter documented areas
default:
disable_default_routes: true
path_patterns: [ ^/(?!api) ]
internal:
disable_default_routes: true
path_patterns: [ ^/((?!/api/v1)(?!external).)*$ ]
documentation:
components:
securitySchemes:
oauth2:
type: oauth2
name: Authorization
flows:
authorizationCode:
authorizationUrl: "%env(OAUTH_URL)%%env(OAUTH_AUTHORIZE_URL)%"
tokenUrl: "%env(OAUTH_URL)%%env(OAUTH_TOKEN_URL)%"
scopes: { }
security:
- oauth2: [ ]
tags:
- name: oauth
description: Авторизация

Action code is next:

#[OA\Tag(name: 'oauth')]
#[OA\Get(
    responses: [
        new OA\Response(
            response: HttpResponse::HTTP_OK,
            description: '',
            content: new OA\JsonContent(
                ref: new Model(
                    type: Response::class,
                ),
                type: 'object',
            ),
        ),
        new OA\Response(
            ref: '#/components/responses/Unauthorized',
            response: HttpResponse::HTTP_UNAUTHORIZED,
        ),
        new OA\Response(
            ref: '#/components/responses/Forbidden',
            response: HttpResponse::HTTP_FORBIDDEN,
        ),
        new OA\Response(
            ref: '#/components/responses/UnsupportedMediaType',
            response: HttpResponse::HTTP_UNSUPPORTED_MEDIA_TYPE,
        ),
    ],
)]
#[Route('/me', name: 'me', methods: [Request::METHOD_GET])]
public function __invoke(Request $request): JsonResponse
{
    $user = $this->authService->getUser($this->tokenResolver->resolve($request));

    return new JsonResponse(
        data: new Response($user),
    );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants