Skip to content

[RFC] Methods in framework base controller #11294

Closed
@Nek-

Description

@Nek-

Hello,

I never understood why methods are public and not protected. Is there needed to have them public ? IMO it can only suggest a wrong usage of the controller.

In another way KnpRadBundle propose a new way to work with theses methods by using Helpers, this make. What do you think about implementing them in Symfony ?

https://github.com/KnpLabs/KnpRadBundle/blob/develop/Controller/Controller.php#L14

So in summary this is 3 proposal:

  • Switch controller methods to protectedinstead of public;
  • Make the controller abstract;
  • Add helpers the controller uses.

Thanks for attention :) .

[edit] After discussion, I added a third point.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions