Skip to content
This repository has been archived by the owner on Sep 9, 2019. It is now read-only.

Controller::run #79

Closed
SamMousa opened this issue Nov 2, 2017 · 0 comments
Closed

Controller::run #79

SamMousa opened this issue Nov 2, 2017 · 0 comments

Comments

@SamMousa
Copy link
Contributor

SamMousa commented Nov 2, 2017

I think Controller::run() should be removed. It's not used anywhere in the framework.

What steps will reproduce the problem?

Try to override run().

What is the expected result?

  • Application resolves request
  • Application creates controller
  • Application calls ->run() on controller
  • Controller calls ->runAction() for the specified action.

What do you get instead?

  • Application resolves request
  • Application creates controller
  • Application calls ->runAction() on controller

Additional info

To me it seems this should not be part of the core framework; it provides a way to execute other routes from a controller. Doing that does not feel like a good practice that should be stimulated.
If it is really needed one should use app->runAction instead and re-resolve the whole route instead of this random shortcut.

Q A
Yii version dev-master
PHP version N/A
Operating system N/A
@samdark samdark transferred this issue from yiisoft/yii2 Nov 19, 2018
@samdark samdark closed this as completed Feb 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants