Commit 5f86d40
Inject route's resolved arguments into shutdown/error hooks
The earlier removal of Hook::setParamValue writeback closed the
concurrency hole but stranded a real use case: shutdown hooks that
need the request's full resolved param map (post-validation, post-
coercion) to do label substitution like {request.fileId}.
Populate a name-keyed snapshot of the route's resolved arguments on
the per-request context as 'arguments', set right before the action
runs. Race-free (per-request context container, coroutine-local
under Swoole), no per-Hook mutation, and reuses the values
getArguments() already resolved — no validator double-invocation.
Available via ->inject('arguments') from shutdown / error hooks.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0707b7c commit 5f86d40
2 files changed
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
634 | 646 | | |
635 | 647 | | |
636 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
369 | 398 | | |
370 | 399 | | |
371 | 400 | | |
| |||
0 commit comments