File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 3232 "psr/http-server-handler" : " ^1.0" ,
3333 "psr/http-server-middleware" : " ^1.0" ,
3434 "psr/log" : " ^1.0 || ^2.0 || ^3.0" ,
35- "symfony/finder" : " ^5.4 || ^6.4 || ^7.3 || ^8.0" ,
3635 "symfony/uid" : " ^5.4 || ^6.4 || ^7.3 || ^8.0"
3736 },
37+ "suggest" : {
38+ "symfony/finder" : " Required for file-based discovery."
39+ },
3840 "require-dev" : {
3941 "ext-openssl" : " *" ,
4042 "composer/semver" : " ^3.0" ,
5052 "psr/simple-cache" : " ^2.0 || ^3.0" ,
5153 "symfony/cache" : " ^5.4 || ^6.4 || ^7.3 || ^8.0" ,
5254 "symfony/console" : " ^5.4 || ^6.4 || ^7.3 || ^8.0" ,
55+ "symfony/finder" : " ^5.4 || ^6.4 || ^7.3 || ^8.0" ,
5356 "symfony/http-client" : " ^5.4 || ^6.4 || ^7.3 || ^8.0" ,
5457 "symfony/process" : " ^5.4 || ^6.4 || ^7.3 || ^8.0"
5558 },
Original file line number Diff line number Diff line change 2424use Mcp \Capability \Registry \ResourceTemplateReference ;
2525use Mcp \Capability \Registry \ToolReference ;
2626use Mcp \Exception \ExceptionInterface ;
27+ use Mcp \Exception \RuntimeException ;
2728use Mcp \Schema \Prompt ;
2829use Mcp \Schema \PromptArgument ;
2930use Mcp \Schema \Resource ;
@@ -53,6 +54,10 @@ public function __construct(
5354 private ?DocBlockParser $ docBlockParser = null ,
5455 private ?SchemaGeneratorInterface $ schemaGenerator = null ,
5556 ) {
57+ if (!class_exists (Finder::class)) {
58+ throw new RuntimeException ('File-based discovery requires symfony/finder. Run: composer require symfony/finder ' );
59+ }
60+
5661 $ this ->docBlockParser = $ docBlockParser ?? new DocBlockParser (logger: $ this ->logger );
5762 $ this ->schemaGenerator = $ schemaGenerator ?? new SchemaGenerator ($ this ->docBlockParser );
5863 }
You can’t perform that action at this time.
0 commit comments