• Igor Wiedler's avatar
    Create default set of listeners late · 51df9f5a
    Igor Wiedler authored
    Right now the following subscribers are created together with the
    dispatcher:
    
    * app
    * exception_handler
    * ResponseListener
    * RouterListener
    
    With the exception_handler in particular this is an issue because you
    can no longer change it after the dispatcher has been created. And it
    gets created when you call before(), after() or error(). It means that
    you cannot unset it for tests.
    
    The RouterListener has a similar issue because you can no longer change
    the UrlMatcher it uses. And you cannot move its creation into a request
    listener, because request listeners cannot add other request listeners
    (the new ones won't get executed anymore at that point).
    
    This commit ensures that those listeners will be created a lot later,
    allowing their dependencies to be modified before runtime.
    51df9f5a
Name
Last commit
Last update
..
Silex Loading commit data...