FOSRestBundle icon indicating copy to clipboard operation
FOSRestBundle copied to clipboard

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

Open martinszeltins opened this issue 3 years ago • 3 comments

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

martinszeltins avatar Apr 16 '22 11:04 martinszeltins

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.

W0rma avatar May 02 '22 11:05 W0rma

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.

Sajito avatar Mar 01 '23 08:03 Sajito

@Sajito See https://github.com/symfony/recipes-contrib/pull/1493 for adjusting the recipe

W0rma avatar Mar 13 '23 17:03 W0rma