8000 [HttpKernel] Sort the KernelEvents constants by hermann8u · Pull Request #35248 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] Sort the KernelEvents constants #35248

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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Sort the KernelEvents constants to match the lifecycle of the framewo…
…rk execution
  • Loading branch information
hermann8u committed Jan 7, 2020
commit a98d7d1a3480f2b174088f9f558bcbd85705e12b
42 changes: 21 additions & 21 deletions src/Symfony/Component/HttpKernel/KernelEvents.php
56CB
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,6 @@ final class KernelEvents
*/
const REQUEST = 'kernel.request';

/**
* The EXCEPTION event occurs when an uncaught exception appears.
*
* This event allows you to create a response for a thrown exception or
* to modify the thrown exception.
*
* @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent")
*/
const EXCEPTION = 'kernel.exception';

/**
* The VIEW event occurs when the return value of a controller
* is not a Response instance.
*
* This event allows you to create a response for the return value of the
* controller.
*
* @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent")
*/
const VIEW = 'kernel.view';

/**
* The CONTROLLER event occurs once a controller was found for
* handling a request.
Expand All @@ -71,6 +50,17 @@ final class KernelEvents
*/
const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments';

/**
* The VIEW event occurs when the return value of a controller
* is not a Response instance.
*
* This event allows you to create a response for the return value of the
* controller.
*
* @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent")
*/
const VIEW = 'kernel.view';

/**
* The RESPONSE event occurs once a response was created for
* replying to a request.
Expand Down Expand Up @@ -100,4 +90,14 @@ final class KernelEvents
* @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent")
*/
const FINISH_REQUEST = 'kernel.finish_request';

/**
* The EXCEPTION event occurs when an uncaught exception appears.
*
* This event allows you to create a response for a thrown exception or
* to modify the thrown exception.
*
* @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent")
*/
const EXCEPTION = 'kernel.exception';
}
0