Skip to content

Commit b226bf5

Browse files
loks0nclaude
andcommitted
Remove dead Route::matchedPath methods and unused Http::$requestContainer
Removed instead of left as @deprecated — neither has been part of any working code path since the previous commit, and keeping them around just preserves footguns (the matched-path getter would silently return '' on a route returned from Router::match). Removed: - Route::$matchedPath property - Route::setMatchedPath() / Route::getMatchedPath() - Http::$requestContainer property (never assigned) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 61bbb78 commit b226bf5

2 files changed

Lines changed: 0 additions & 31 deletions

File tree

src/Http/Http.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ 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-
*/
56-
protected ?Container $requestContainer = null;
57-
5851
/**
5952
* Current running mode
6053
*/

src/Http/Route.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class Route extends Hook
3838
*/
3939
protected int $order;
4040

41-
protected string $matchedPath = '';
42-
4341
public function __construct(string $method, string $path)
4442
{
4543
parent::__construct();
@@ -48,28 +46,6 @@ public function __construct(string $method, string $path)
4846
$this->order = ++self::$counter;
4947
}
5048

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-
*/
57-
public function setMatchedPath(string $path): self
58-
{
59-
$this->matchedPath = $path;
60-
return $this;
61-
}
62-
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-
*/
68-
public function getMatchedPath(): string
69-
{
70-
return $this->matchedPath;
71-
}
72-
7349
/**
7450
* Get Route Order ID
7551
*/

0 commit comments

Comments
 (0)