nelmio/NelmioCorsBundle — comment on commit fb243ace83c55280d8a7841a0fbaf22a4e947600
File: EventListener/Kernel.php line 70
By stof:

This seems weird to me, and create a circular dependency when not lazy-loading the listener (for instance if someone wants to reuse it in Silex).

A better solution could be to set a ``_nelmio_cors`` attribute in the Request object and check for it in the ``onKernelResponse`` method. This way, the listener would not need to know about the dispatcher.