Skip to content

Use constant instead of string for Kernel events #5953

Closed
@ghost

Description

Example:
http://symfony.com/doc/master/cookbook/event_dispatcher/event_listener.html#creating-an-event-subscriber

Currently:

        return array(
           'kernel.exception' => array(
               array('processException', 10),
               array('logException', 0),
               array('notifyException', -10),
           )
        );

I think it should be changed to:

        return array(
           KernelEvents::EXCEPTION => array(
               array('processException', 10),
               array('logException', 0),
               array('notifyException', -10),
           )
        );

If you agree you may add the "Actionable" label to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EventDispatcherHack DayactionableClear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions