Skip to content

fix: use JsonSchema interface instead of concrete class#2

Merged
MiniCodeMonkey merged 1 commit intoMiniCodeMonkey:mainfrom
sixlive:fix/json-schema-interface-compatibility
Jan 27, 2026
Merged

fix: use JsonSchema interface instead of concrete class#2
MiniCodeMonkey merged 1 commit intoMiniCodeMonkey:mainfrom
sixlive:fix/json-schema-interface-compatibility

Conversation

@sixlive
Copy link
Contributor

@sixlive sixlive commented Jan 26, 2026

Change type hint from Illuminate\JsonSchema\JsonSchema to Illuminate\Contracts\JsonSchema\JsonSchema in all tool schema methods to match the parent Laravel\Mcp\Server\Tool::schema() signature.

This fixes the fatal error:
Declaration of ...::schema(Illuminate\JsonSchema\JsonSchema $schema): array must be compatible with Laravel\Mcp\Server\Tool::schema(Illuminate\Contracts\JsonSchema\JsonSchema $schema): array

Change type hint from `Illuminate\JsonSchema\JsonSchema` to
`Illuminate\Contracts\JsonSchema\JsonSchema` in all tool schema
methods to match the parent `Laravel\Mcp\Server\Tool::schema()`
signature.

This fixes the fatal error:
Declaration of ...::schema(Illuminate\JsonSchema\JsonSchema $schema): array
must be compatible with Laravel\Mcp\Server\Tool::schema(Illuminate\Contracts\JsonSchema\JsonSchema $schema): array
@MiniCodeMonkey MiniCodeMonkey merged commit 148e8b4 into MiniCodeMonkey:main Jan 27, 2026
@MiniCodeMonkey
Copy link
Owner

🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants