projects
/
GitHub
/
WoltLab
/
woltlab.github.io.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbf0152
)
Update the PSR-15 example for the CheckHttpMethod middleware
author
Tim Düsterhus
<duesterhus@woltlab.com>
Wed, 14 Dec 2022 13:07:33 +0000
(14:07 +0100)
committer
Tim Düsterhus
<duesterhus@woltlab.com>
Wed, 14 Dec 2022 13:07:33 +0000
(14:07 +0100)
see WoltLab/WCF#5181
docs/migration/wsc55/php.md
patch
|
blob
|
blame
|
history
diff --git
a/docs/migration/wsc55/php.md
b/docs/migration/wsc55/php.md
index 5a81519a91fa79b8ee8de418e7cc0d05c707bc0b..196f930f7e775cf3416fcb694e5c7296fe137cda 100644
(file)
--- a/
docs/migration/wsc55/php.md
+++ b/
docs/migration/wsc55/php.md
@@
-254,9
+254,10
@@
if ($request->getMethod() === 'GET') {
],
]);
} else {
- return new TextResponse('The used HTTP method is not allowed.', 405, [
- 'allow' => 'POST, GET',
- ]);
+ // The used method is validated by a middleware. Methods that are not
+ // GET or POST need to be explicitly allowed using the 'AllowHttpMethod'
+ // attribute.
+ throw new \LogicException('Unreachable');
}
```