mevdschee / mevdschee/php-crud-api

Add to Readme: the order in which middleware is defined matters

Open
#936 1 comment 1 reaction 1 assignee View on GitHub

@mevdschee is already working on this.

Since Nov 30, 2022.

enhancement
Dominant language
PHP
Stars
3.7k
Forks
1k
Avg merge
1h 55m
Merged PRs (30d)
7

Description

This is a suggestion rather than a bug or problem.

The readme should point out that the order in which middleware is defined also controls the order in which it is executed. It is also possible to call a middleware more than once.

I don't know if this is intentional, but it cost me some nerves :) I struggled with sanitation and validation for example. But there are some great options as well.

I haven't tried it yet, but this way you could probably control the reconnect middleware better because you get more parameters in other handlers. There were some questions here about that.

So long story short, if its by intentional I think it should be mentioned in the docu as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.