Skip to content

Commit fe7b67a

Browse files
committed
removes addTool
1 parent 86f29e3 commit fe7b67a

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"laravel/pint": "1.20.0",
3535
"orchestra/testbench": "^8.36.0|^9.15.0|^10.6.0",
3636
"pestphp/pest": "^2.36.0|^3.8.4|^4.1.0",
37-
"phpstan/phpstan": "^2.1.26",
37+
"phpstan/phpstan": "^2.1.27",
3838
"rector/rector": "^2.1.7"
3939
},
4040
"autoload": {

src/Server.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,6 @@ public function addMethod(string $method, string $handler): void
137137
$this->methods[$method] = $handler;
138138
}
139139

140-
/**
141-
* Dynamically add a Tool to the server.
142-
*
143-
* @param class-string<Tool>|Tool $tool
144-
*/
145-
public function addTool(string|Tool $tool): void
146-
{
147-
$this->tools[] = $tool;
148-
}
149-
150140
public function start(): void
151141
{
152142
$this->boot();

tests/Fixtures/ServerWithDynamicTools.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ServerWithDynamicTools extends Server
1212

1313
protected function boot(): void
1414
{
15-
$this->addTool(SayHiTool::class);
16-
$this->addTool(StreamingTool::class);
15+
$this->tools[] = SayHiTool::class;
16+
$this->tools[] = StreamingTool::class;
1717
}
1818
}

0 commit comments

Comments
 (0)