Skip to content

Commit deff734

Browse files
committed
Expand Lumen support
1 parent 8c4cc01 commit deff734

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ The MCP protocol also defines a "Streamable HTTP SSE" mode, but this package doe
270270
## Requirements
271271

272272
- PHP >=8.2
273-
- Laravel >=10.x or Lumen >=11.x
273+
- Laravel >=10.x or Lumen >=9.x
274274

275275
## Installation
276276

@@ -287,7 +287,7 @@ The MCP protocol also defines a "Streamable HTTP SSE" mode, but this package doe
287287

288288
### Lumen Setup
289289

290-
The package also supports Lumen 11.x applications. After installing the dependency via Composer:
290+
The package also supports Lumen 9.x and newer applications. After installing the dependency via Composer:
291291

292292
1. Enable the optional helpers you need inside `bootstrap/app.php`:
293293
```php

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"require": {
1212
"php": "^8.2",
1313
"spatie/laravel-package-tools": "^1.16",
14-
"illuminate/contracts": "^10.0||^11.0||^12.0"
14+
"illuminate/contracts": "^9.0||^10.0||^11.0||^12.0"
1515
},
1616
"require-dev": {
1717
"laravel/pint": "^1.14",
18-
"laravel/lumen-framework": "^11.0",
18+
"laravel/lumen-framework": "^9.0||^10.0||^11.0",
1919
"nunomaduro/collision": "^8.1.1||^7.10.0",
2020
"larastan/larastan": "^2.9||^3.0",
2121
"orchestra/testbench": "^9.0.0||^8.22.0",

src/LaravelMcpServerServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function registerRoutes(): void
7676
}
7777

7878
// Skip route registration if MCPServer instance doesn't exist
79-
if (! app()->has(MCPServer::class)) {
79+
if (! $this->app->bound(MCPServer::class)) {
8080
return;
8181
}
8282

tests/Lumen/TestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ protected function setUp(): void
1616
{
1717
parent::setUp();
1818

19+
if (! class_exists(\Laravel\Lumen\Application::class)) {
20+
$this->markTestSkipped('Laravel Lumen is not installed.');
21+
}
22+
1923
$this->app = new TestingApplication($this->basePath());
2024
$this->app->instance('path.config', $this->basePath('config'));
2125
$this->app->instance('config', new ConfigRepository);

0 commit comments

Comments
 (0)