Closed bazo closed 9 months ago
ugh, apparently it matters in which file you write that. more symfony magic :(
aha, but if i creae a file config/config.yml and put
fos_js_routing:
routes_to_expose: ['^handle_[\S]+']
the route doesnt get exposed
what do i need to do for it to work properly? thanks in advance
Hi @bazo, thanks for contacting us. The documentation is somewhat outdated since this bundle was set up when Symfony 2 was still the latest... By now Symfony has changed to the file extension .yaml
instead of .yml
, and they have decoupled the package/bundle configuration from the main service configuration. You can create/edit the file config/packages/fos_js_routing.yaml
and add your configuration for this bundle there.
I think it would be nice to update the documentation and add a sample configuration to the recipe to make it more developer-friendly, so feel free to open a PR if you think you can add something there (otherwise I will do that somewhere in the future, but it might take a while).
BTW I don't agree with your statement about Symfony magic 😉 I think separating routing information from your application configuration makes a lot of sense, but it can take a while to get comfortable with all the concepts I imagine
thanks, now it works. creating a config file under packages helped. thanks for such quick reply.
i installed version 3.1, using symfony 6, the package created fos_js_routing.yaml in config/routes folder with content
i have added a key routes_to_expose as per documentation
when i run dump command or any symfony command or even try to visit the web app i get this error
has anything changed in configuration? is the documentation outdated? thanks