Skip to content

Commit 61bbb78

Browse files
loks0nclaude
andcommitted
Chore: Mark dead Route::matchedPath methods and unused Http::$requestContainer as @deprecated
Route::setMatchedPath() / Route::getMatchedPath() are no longer called by the framework after Router::match() switched to returning the matched path in its return tuple. Http::$requestContainer was never assigned — per-request state lives on the adapter's container. Left in place for backwards compatibility; flagged for removal in a future major release. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 20a944f commit 61bbb78

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/Http/Http.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class Http
4848

4949
protected Container $container;
5050

51+
/**
52+
* @deprecated Never assigned by the framework. Per-request state lives
53+
* on the adapter's container (coroutine-local under Swoole). Will be
54+
* removed in a future major release.
55+
*/
5156
protected ?Container $requestContainer = null;
5257

5358
/**

src/Http/Route.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,23 @@ public function __construct(string $method, string $path)
4848
$this->order = ++self::$counter;
4949
}
5050

51+
/**
52+
* @deprecated No longer used by the framework. The matched-path string
53+
* is returned alongside the Route from Router::match() instead, so the
54+
* shared Route singleton is not mutated per request. Will be removed
55+
* in a future major release.
56+
*/
5157
public function setMatchedPath(string $path): self
5258
{
5359
$this->matchedPath = $path;
5460
return $this;
5561
}
5662

63+
/**
64+
* @deprecated No longer populated by Router::match(). Read the matched
65+
* path from the second element of Router::match()'s return tuple
66+
* instead. Will be removed in a future major release.
67+
*/
5768
public function getMatchedPath(): string
5869
{
5970
return $this->matchedPath;

0 commit comments

Comments
 (0)