Skip to content

Commit 708fed0

Browse files
committed
fix: wip
1 parent 05e608f commit 708fed0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MCP/Concerns/FieldMcpSchemaDetection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ trait FieldMcpSchemaDetection
1717
*/
1818
public static function hasJsonSchemaSupport(): bool
1919
{
20-
return class_exists(\Illuminate\JsonSchema\JsonSchemaTypeFactory::class);
20+
// Check for the interface first - this is what Laravel 12 provides
21+
// The class_exists check on JsonSchemaTypeFactory would trigger autoloading
22+
// which fails on Laravel 11 because the interface doesn't exist
23+
return interface_exists(\Illuminate\Contracts\JsonSchema\JsonSchema::class);
2124
}
2225

2326
/**

0 commit comments

Comments
 (0)