Spoiler: I would like to better understand the request life cycle in CakePHP application.
Background: I'm on CakePHP v2.3. I am debugging a problem that leads to unwanted redirects that I cannot find. I am trying to fulfill my request life cycle by adding incrementally die()to try to determine where the redirect occurs.
I am at a dead end because I can kill the execution from inside the beforeFilter () controller, but the redirection happens if I move die()to the actual action.
So my specific question is: what happens after beforeFilter, but before the action? I know beforeRender (), which had no effect when I posted die()there.
My more general / better question is: is there any documentation for the full CakePHP request life cycle?
The answer to any of them would be wonderful.
Update
Thanks to Matthew F.’s helpful suggestions, I am focusing on the Auth component because it’s almost the only candidate and the redirect I am debugging looks like handiwork (the user comes to the authRedirect location). However, when I finish die()at the top of the AppController isAuthorized(), nothing happens. And my controller does not have isAuthorized(). So that again puzzled me a little.
source
share