Create "Middleware" article in "Internals"
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- documentation
Research direction
Start by reviewing the requested Internals article topic and the related yiisoft/auth pull request #101. Locate the existing Internals documentation structure, then document the middleware failure-handler convention and the AuthenticationFailureHandlerInterface and ThrowableHandlerInterface examples shown in the issue. Done means the convention is clearly recorded in the new article.
Written by the indexing model from the issue text.
Description
Convention about failure handler in middleware should be written.
Because each failure handler is specific for each middleware, so it shouldn't implement RequestHandlerInterface. So separate failure handler interface should be created for each middleware.
Example:
interface AuthenticationFailureHandlerInterface
{
public function handle(ServerRequestInterface $request): ResponseInterface;
}
When failure handler requires some context, it should be a second parameter in handle() metod. For example:
interface ThrowableHandlerInterface
{
public function create(ServerRequestInterface $request, Throwable $throwable): ResponseInterface;
}
Related PRs:
- Dominant language
- JavaScript
- Stars
- 252
- Forks
- 98
- Avg merge
- 7h 12m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yiisoft/docs
-
type:bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
status:ready for adoption
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
status:ready for adoption type:feature
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·