Skip to content

[13.x] Add PHPDoc and type declarations in resource JSON:API resource stub - #61452

Open
Muetze42 wants to merge 1 commit into
laravel:13.xfrom
Muetze42:change-resource-json-api.stub
Open

[13.x] Add PHPDoc and type declarations in resource JSON:API resource stub#61452
Muetze42 wants to merge 1 commit into
laravel:13.xfrom
Muetze42:change-resource-json-api.stub

Conversation

@Muetze42

@Muetze42 Muetze42 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This PR adds native array type declarations and more specific PHPDoc types to the JSON resource stub.

The generated resource now provides better type information for the $attributes and $relationships properties, improving IDE support and static analysis without changing their runtime behavior.

This is backwards compatible as the existing properties already contain arrays.

@Muetze42 Muetze42 changed the title Add PHPDoc and type declarations in resource JSON:API resource stub [13.x] Add PHPDoc and type declarations in resource JSON:API resource stub Sep 5, 2026
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.

1 participant