php-crud-api
php-crud-api copied to clipboard
Add to Readme: the order in which middleware is defined matters
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.
Hi @kkrell2016, thank you for opening this issue.
The readme should point out that the order in which middleware is defined also controls the order in which it is executed.
Agree.
It is also possible to call a middleware more than once.
I would not recommend to do that.
So long story short, if its by intentional ...
Yes, it is intentional.
I think it should be mentioned in the docu as well.
Can you propose an addition to the documentation that makes this clear?
Kindest regards, Maurits