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

Invalid configuration for path "fos_rest.routing_loader": only "false" is supported #2367

Open
martinszeltins opened this issue Apr 16, 2022 · 3 comments

Comments

@martinszeltins
Copy link

martinszeltins commented Apr 16, 2022

I am getting this error with the default configuration.

Invalid configuration for path "fos_rest.routing_loader": only "false" is supported

fos_rest:
    param_fetcher_listener:  true
    allowed_methods_listener:  true
    routing_loader: true
    view:
        view_response_listener:  true
    format_listener:
        rules:
            - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] }

I am using Symfony 6.0 and friendsofsymfony/rest-bundle 3.3

@W0rma
Copy link
Contributor

W0rma commented May 2, 2022

Have you already checked https://github.com/FriendsOfSymfony/FOSRestBundle/blob/3.x/UPGRADING-3.0.md#upgrading-from-2x-to-30? Seems like the very first entry on this page is about your reported error.

@Sajito
Copy link

Sajito commented Mar 1, 2023

I think the main issue here is that having routing_loader set to true is part of the symfony flex recipe (https://github.com/symfony/recipes-contrib/tree/main/friendsofsymfony/rest-bundle/2.2), even though it's undocumented.
Since the documentation does not contain any information about that settings, it's pretty hard to understand the issue.

I don't think people tend to look into the UPGRADING steps, after doing a clean install of this bundle directly using version >3.

@W0rma
Copy link
Contributor

W0rma commented Mar 13, 2023

@Sajito See symfony/recipes-contrib#1493 for adjusting the recipe

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

No branches or pull requests

3 participants