FOSRestBundle
FOSRestBundle copied to clipboard
Invalid configuration for path "fos_rest.routing_loader": only "false" is supported
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
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.
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 See https://github.com/symfony/recipes-contrib/pull/1493 for adjusting the recipe