Commit 94371de
Drop Http::getRoute()
The supported way to consume the matched route is via the 'route'
injection inside hooks/actions:
Http::init()
->inject('route')
->action(function (?Route $route) { ... });
getRoute() was a convenience accessor on the shared Http instance.
Reading mutable per-request state through a method on a shared object
encourages racy patterns under coroutines (e.g. caching a Route
reference, calling getRoute() outside a request scope). Drop it; tests
that needed the matched route now consume it via the injection or via
the RouteMatch returned from match() directly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 08545da commit 94371de
2 files changed
Lines changed: 2 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | 407 | | |
423 | 408 | | |
424 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
627 | 626 | | |
628 | 627 | | |
629 | 628 | | |
| |||
652 | 651 | | |
653 | 652 | | |
654 | 653 | | |
655 | | - | |
656 | 654 | | |
657 | 655 | | |
658 | 656 | | |
| |||
666 | 664 | | |
667 | 665 | | |
668 | 666 | | |
669 | | - | |
670 | 667 | | |
671 | 668 | | |
672 | 669 | | |
673 | 670 | | |
674 | | - | |
675 | 671 | | |
676 | 672 | | |
677 | 673 | | |
| |||
685 | 681 | | |
686 | 682 | | |
687 | 683 | | |
688 | | - | |
689 | 684 | | |
690 | 685 | | |
691 | 686 | | |
| |||
724 | 719 | | |
725 | 720 | | |
726 | 721 | | |
727 | | - | |
728 | | - | |
| 722 | + | |
| 723 | + | |
729 | 724 | | |
730 | 725 | | |
731 | 726 | | |
| |||
0 commit comments