empress-php / empress

Empress is a flexible microframework for creating async web applications in PHP 8.1.
MIT License
15 stars 0 forks source link

Don't filter handlers twice #23

Closed jakobmats closed 3 years ago

jakobmats commented 3 years ago

In Router::dispatch:

                $beforeFilters = $handlerCollection
                    ->filterByPath($path)
                    ->filterByType(HandlerType::BEFORE);

Before/after handlers are filtered twice as the handler collection passed to dispatch() is already filtered by path.