Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding Controllers Sf3.4 - ignored calls #2778

Closed
DeveloperSlope3 opened this issue Apr 9, 2018 · 5 comments
Closed

Overriding Controllers Sf3.4 - ignored calls #2778

DeveloperSlope3 opened this issue Apr 9, 2018 · 5 comments

Comments

@DeveloperSlope3
Copy link

When we try to override the Controllers as the documentation says to give our own functionallity, our code is ignored.

We want to redirect to backend when you open login page and you are logged in

We are using Sf3.4 + FOSUserBundle2

@devtronic
Copy link

devtronic commented Apr 13, 2018

Can you refer to the exact point in the documentation? (Provide a link)

@DeveloperSlope3
Copy link
Author

@MonsieurPilou
Copy link

Hi,
I have the same problem with the v2.1.2 & Sf3.3
It used to work with the version 2.0.2.
Our own controller overrided is ignored (ResettingController.php).

Thanks

@bytehead
Copy link

bytehead commented Apr 19, 2018

I have this problem as well. Looks like a BC break to me. Bundle inheritance is just deprecated in 3.4: https://symfony.com/blog/new-in-symfony-3-4-deprecated-bundle-inheritance
See https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Upgrade.md#20-to-21

@DeveloperSlope3
Copy link
Author

Thanks @bytehead as I can read in blog entrance you'd linked:

In Symfony 3.4 we worked towards simplifying bundles even more. That's why we deprecated bundle inheritance and we'll remove it in Symfony 4.0. This inheritance mechanism was traditionally used to override some templates, controllers and other elements of third-party bundles. In Symfony 4.0 you'll need to use alternative solutions to override those elements:

Controllers: define a route with the same path as the controller you want to override and implement your own logic.

We will try that.

Please, people of symfony, change the documentation of this bundle!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants