Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport before throttle event from 2.x #43

Merged
merged 6 commits into from
Aug 12, 2020
Merged

Backport before throttle event from 2.x #43

merged 6 commits into from
Aug 12, 2020

Conversation

jorisvaesen
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Aug 11, 2020

Codecov Report

Merging #43 into master will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #43      +/-   ##
============================================
+ Coverage     97.80%   98.00%   +0.19%     
- Complexity       27       29       +2     
============================================
  Files             3        3              
  Lines            91      100       +9     
============================================
+ Hits             89       98       +9     
  Misses            2        2              
Impacted Files Coverage Δ Complexity Δ
src/ThrottleTrait.php 100.00% <ø> (ø) 14.00 <0.00> (ø)
src/Middleware/ThrottleMiddleware.php 95.83% <100.00%> (+0.83%) 7.00 <0.00> (+1.00)
src/Routing/Filter/ThrottleFilter.php 96.77% <100.00%> (+0.62%) 8.00 <0.00> (+1.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 70d0707...d83538e. Read the comment docs.

@@ -40,6 +41,13 @@ public function __construct($config = [])
*/
public function __invoke(ServerRequest $request, Response $response, callable $next)
{
$event = $this->dispatchEvent(self::EVENT_BEFORE_THROTTLE, [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implements EventDispatcherInterface should also be added to the middleware/filter classes.

@ADmad ADmad merged commit dbbfead into UseMuffin:master Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants