fix(config) : disable uninstalled McpBundle to fix boot crash
McpBundle was registered but symfony/ai-mcp-bundle is not installed, causing a critical error on boot. Disabled all MCP references: - bundles.php: removed McpBundle - mcp.yaml: renamed to mcp.yaml.disabled - routes.yaml: removed mcp route - services.yaml: commented McpHeaderAuthenticator, excluded src/Mcp/ - security.yaml: commented mcp firewall and access control - phpunit.dist.xml: excluded tests/Mcp All marked with TODO for re-enabling when the package is installed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,6 @@ use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
|
|||||||
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
|
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
|
||||||
use Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle;
|
use Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle;
|
||||||
use Nelmio\CorsBundle\NelmioCorsBundle;
|
use Nelmio\CorsBundle\NelmioCorsBundle;
|
||||||
use Symfony\AI\McpBundle\McpBundle;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||||
use Symfony\Bundle\SecurityBundle\SecurityBundle;
|
use Symfony\Bundle\SecurityBundle\SecurityBundle;
|
||||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||||
@@ -23,5 +22,4 @@ return [
|
|||||||
ApiPlatformBundle::class => ['all' => true],
|
ApiPlatformBundle::class => ['all' => true],
|
||||||
LexikJWTAuthenticationBundle::class => ['all' => true],
|
LexikJWTAuthenticationBundle::class => ['all' => true],
|
||||||
DAMADoctrineTestBundle::class => ['test' => true],
|
DAMADoctrineTestBundle::class => ['test' => true],
|
||||||
McpBundle::class => ['all' => true],
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ security:
|
|||||||
pattern: ^/api/session/profiles?$
|
pattern: ^/api/session/profiles?$
|
||||||
security: false
|
security: false
|
||||||
|
|
||||||
mcp:
|
# TODO: re-enable when symfony/ai-mcp-bundle is installed
|
||||||
pattern: ^/_mcp
|
# mcp:
|
||||||
stateless: true
|
# pattern: ^/_mcp
|
||||||
custom_authenticators:
|
# stateless: true
|
||||||
- App\Mcp\Security\McpHeaderAuthenticator
|
# custom_authenticators:
|
||||||
|
# - App\Mcp\Security\McpHeaderAuthenticator
|
||||||
|
|
||||||
api:
|
api:
|
||||||
pattern: ^/api
|
pattern: ^/api
|
||||||
@@ -55,7 +56,7 @@ security:
|
|||||||
- { path: ^/api/admin, roles: ROLE_ADMIN }
|
- { path: ^/api/admin, roles: ROLE_ADMIN }
|
||||||
- { path: ^/api/docs, roles: PUBLIC_ACCESS }
|
- { path: ^/api/docs, roles: PUBLIC_ACCESS }
|
||||||
- { path: ^/api/health$, roles: PUBLIC_ACCESS }
|
- { path: ^/api/health$, roles: PUBLIC_ACCESS }
|
||||||
- { path: ^/_mcp, roles: ROLE_USER }
|
# - { path: ^/_mcp, roles: ROLE_USER } # TODO: re-enable with MCP
|
||||||
- { path: ^/docs, roles: PUBLIC_ACCESS }
|
- { path: ^/docs, roles: PUBLIC_ACCESS }
|
||||||
- { path: ^/contexts, roles: PUBLIC_ACCESS }
|
- { path: ^/contexts, roles: PUBLIC_ACCESS }
|
||||||
- { path: ^/\.well-known, roles: PUBLIC_ACCESS }
|
- { path: ^/\.well-known, roles: PUBLIC_ACCESS }
|
||||||
|
|||||||
@@ -12,7 +12,3 @@ api_login_check:
|
|||||||
|
|
||||||
controllers:
|
controllers:
|
||||||
resource: routing.controllers
|
resource: routing.controllers
|
||||||
|
|
||||||
mcp:
|
|
||||||
resource: .
|
|
||||||
type: mcp
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ services:
|
|||||||
# this creates a service per class whose id is the fully-qualified class name
|
# this creates a service per class whose id is the fully-qualified class name
|
||||||
App\:
|
App\:
|
||||||
resource: '../src/'
|
resource: '../src/'
|
||||||
|
exclude:
|
||||||
|
- '../src/Mcp/'
|
||||||
|
|
||||||
# add more service definitions when explicit configuration is needed
|
# add more service definitions when explicit configuration is needed
|
||||||
# please note that last definitions always *replace* previous ones
|
# please note that last definitions always *replace* previous ones
|
||||||
@@ -34,9 +36,10 @@ services:
|
|||||||
tags:
|
tags:
|
||||||
- { name: doctrine.event_subscriber }
|
- { name: doctrine.event_subscriber }
|
||||||
|
|
||||||
App\Mcp\Security\McpHeaderAuthenticator:
|
# TODO: re-enable when symfony/ai-mcp-bundle is installed
|
||||||
arguments:
|
# App\Mcp\Security\McpHeaderAuthenticator:
|
||||||
$mcpAuthLimiter: '@limiter.mcp_auth'
|
# arguments:
|
||||||
|
# $mcpAuthLimiter: '@limiter.mcp_auth'
|
||||||
|
|
||||||
App\OpenApi\OpenApiDecorator:
|
App\OpenApi\OpenApiDecorator:
|
||||||
decorates: 'api_platform.openapi.factory'
|
decorates: 'api_platform.openapi.factory'
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Project Test Suite">
|
<testsuite name="Project Test Suite">
|
||||||
<directory>tests</directory>
|
<directory>tests</directory>
|
||||||
|
<exclude>tests/Mcp</exclude>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user