dunglas / DunglasActionBundle

Symfony controllers, redesigned
https://dunglas.fr/2016/01/dunglasactionbundle-symfony-controllers-redesigned/
MIT License
256 stars 14 forks source link

Trim `__invoke` in the default name for annoted routes #41

Closed Baldinof closed 8 years ago

Baldinof commented 8 years ago

Hi, thank you for this bundle :)

Currently, default routes names are for example app_action_homepage__invoke.

Would you accept a PR that trims the __invoke?

This will be a BC break, if some users already relies on default routes name.

dunglas commented 8 years ago

Why not! BC breaks are still allowed at this point (1.0 hasn't be released yet).

Baldinof commented 8 years ago

Great, I will make the PR.

Baldinof commented 8 years ago

This is harder than I though :disappointed:

I tried something here in AnnotationClassLoader.

But if SensioFrameworkExtraBundle is defined before DunglasActionBundle in the kernel, the class will not be used.

Also when the loader from this bundle is used, @Method annotations are not parsed as it's done by AnnotatedRouteControllerLoader.

I think it's related to #37.

@dunglas What do you think of it?

GuilhemN commented 8 years ago

IMO it's not worth it and it could create conflicts between routes.

dunglas commented 8 years ago

Closing in favor of #37 (don't deal with the routing subsystem anymore).