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

[5.3] Return unique middlewares after sorting #16034

Merged
merged 1 commit into from
Oct 20, 2016
Merged

[5.3] Return unique middlewares after sorting #16034

merged 1 commit into from
Oct 20, 2016

Conversation

themsaid
Copy link
Member

Before the new middleware sorting code 6b69fb8, the method would produce unique middleware because of this line 6b69fb8#diff-66c4eb54eb5af7de5e493b416e13991dL749.

This PR makes the method act as before by returning a unique set of middlewares.

Check issue: #16027

@taylorotwell taylorotwell merged commit 35981d4 into laravel:5.3 Oct 20, 2016
@themsaid themsaid deleted the fixMiddlewareSorting branch October 21, 2016 07:32
@JosephSilber
Copy link
Member

  1. Shouldn't this happen in the router? Feels a little strange having the SortedMiddleware class be responsible for removing duplicates.
  2. We should probably remove the duplicates before sorting. The smaller the dataset, the better (not that it'd make that much of a difference, but still).

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.

None yet

3 participants