symfony-cmf / routing-auto

RoutingAuto component
https://cmf.symfony.com
Other
6 stars 11 forks source link

POC for defunct route options #36

Open dantleech opened 9 years ago

dantleech commented 9 years ago

The aim of this POC PR is to explore the possiblity passing options to the defunct route handlers - the use case being allowing the redirect HTTP code to be passed to the adapter which creates the redirect route.

Intitially I tried to avoid BC breaks, but the requirement to add $options to the handleDefunctRoutes method breaks any chance of this. The role of the new ConfigurableInterface is therefore up for debate.

wouterj commented 9 years ago

Do you think there are going to be more settings than the HTTP code? Otherwise, I'd prefer to not use the options resolver and just pass a config value to the constructor of LeaveRedirectDefunctRouteHandler.

dantleech commented 9 years ago

There was a reason -- iirc it might have been that the HTTP code is not a DI config, is is metadata.

wouterj commented 9 years ago

I propose to remove the ConfigurableInterface and add a new BC break. However, the current PR doesn't do anything, as the http code option isn't used anywhere in the code.