woohoolabs / harmony

A simple and flexible PHP middleware dispatcher based on PSR-7, PSR-11, and PSR-15
MIT License
164 stars 16 forks source link

Fix issue with middleware after conditional #26

Closed storeman closed 4 years ago

storeman commented 4 years ago

If you add middleware after adding a condtional, nothing in the middleware in the queue is executed after the conditional. This fixes this issue.

codecov[bot] commented 4 years ago

Codecov Report

Merging #26 into master will increase coverage by 0.06%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #26      +/-   ##
============================================
+ Coverage     94.08%   94.15%   +0.06%     
- Complexity       79       81       +2     
============================================
  Files            11       11              
  Lines           169      171       +2     
============================================
+ Hits            159      161       +2     
  Misses           10       10              
Impacted Files Coverage Δ Complexity Δ
src/Harmony.php 100.00% <100.00%> (ø) 21.00 <2.00> (+2.00)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 58f2a9e...8920f60. Read the comment docs.

storeman commented 4 years ago

I've created my own requestHandler, there were to many things I didn't like in your implementation.