php bin/console make:listener

Creates a new event subscriber class or a new event listener class

Usage

make:listener [<name> [<event>]]

Arguments

name    Choose a class name for your event listener or subscriber (e.g. <fg=yellow>ExceptionListener</> or <fg=yellow>ExceptionSubscriber</>) 
event   What event do you want to listen to? 

Help

The make:listener command generates a new event subscriber class or a new event listener class.

php bin/console make:listener ExceptionListener

If the argument is missing, the command will ask for the class name interactively.