Skip to content

Add explicit type definition - #3774

Merged
bobvandevijver merged 1 commit into
6.1from
type-info-conflict
Aug 3, 2026
Merged

Add explicit type definition#3774
bobvandevijver merged 1 commit into
6.1from
type-info-conflict

Conversation

@bobvandevijver

@bobvandevijver bobvandevijver commented Aug 3, 2026

Copy link
Copy Markdown
Member

Type-info was causing issues with this particular property, resulting in "Illuminate\Support\TKey" is not a valid array key type. being thrown when requested the API spec.

By explicitly configuring the API type the issue is resolved.

Copilot AI review requested due to automatic review settings August 3, 2026 18:29
@bobvandevijver bobvandevijver added 馃悰 tag: bug This is a bug. dependencies Pull requests that update a dependency file labels Aug 3, 2026

This comment was marked as outdated.

@bobvandevijver bobvandevijver changed the title Add conflict on symfony/type-info >=8 Add explicit type definition Aug 3, 2026
@bobvandevijver
bobvandevijver requested a review from Copilot August 3, 2026 19:06

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/Entity/Field.php:149

  • Type is being constructed with collectionKeyType but without marking the type as a collection. In Symfony\PropertyInfo, collectionKeyType/collectionValueType are only meaningful when collection: true, otherwise ApiPlatform may ignore the key type and the original TKey array-key issue can persist (or the generated schema will be incorrect).
    #[ApiProperty(builtinTypes: [new Type('array', collectionKeyType: new Type('string'))])]

Type-info was causing issues with this particular property,
resulting in `"Illuminate\Support\TKey" is not a valid array key type.`
being thrown when requested the API spec.

By explicitly configuring the API type the issue is resolved.
@bobvandevijver
bobvandevijver merged commit e24665e into 6.1 Aug 3, 2026
35 checks passed
@bobvandevijver
bobvandevijver deleted the type-info-conflict branch August 3, 2026 19:23
@bobvandevijver bobvandevijver added this to the Bolt 6.1 milestone Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file 馃悰 tag: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants