Skip to content

Commit f68aee8

Browse files
chore: Allow more larave/mcp versions (#700)
* chore: Allow more larave/mcp versions * fix tests * Fix styling * fix * fix --------- Co-authored-by: arthurkirkosa <arthurkirkosa@users.noreply.github.com>
1 parent a69413d commit f68aee8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"php": "^8.3",
2222
"illuminate/contracts": "^11.0|^12.0",
2323
"laravel/framework": "^11.0|^12.0",
24-
"laravel/mcp": "^0.2.0",
24+
"laravel/mcp": "^0.2|^0.3.4",
2525
"laravel/pint": "^1.25.1",
2626
"spatie/laravel-data": "^4.4",
2727
"spatie/laravel-package-tools": "^1.12",

src/MCP/Concerns/FieldMcpSchemaDetection.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Binaryk\LaravelRestify\Http\Requests\RestifyRequest;
77
use Binaryk\LaravelRestify\MCP\Actions\JsonSchemaFromRulesAction;
88
use Binaryk\LaravelRestify\Repositories\Repository;
9-
use Illuminate\JsonSchema\JsonSchema;
109
use Illuminate\JsonSchema\JsonSchemaTypeFactory;
1110
use Illuminate\JsonSchema\Types\ArrayType;
1211
use Illuminate\JsonSchema\Types\BooleanType;
@@ -141,7 +140,7 @@ protected function formatValidationRules(array $rules): array
141140
/**
142141
* Generate examples for the field.
143142
*/
144-
protected function generateFieldExamples(JsonSchema $fieldType): array
143+
protected function generateFieldExamples(Type $fieldType): array
145144
{
146145
$attribute = strtolower($this->attribute);
147146

@@ -279,7 +278,7 @@ protected function hasAnyRule(array $ruleStrings, array $rulesToCheck): bool
279278
/**
280279
* Guess type from attribute name patterns.
281280
*/
282-
protected function guessTypeFromAttributeName(JsonSchema $schema): ?Type
281+
protected function guessTypeFromAttributeName(JsonSchemaTypeFactory $schema): ?Type
283282
{
284283
$attribute = $this->attribute;
285284

0 commit comments

Comments
 (0)