Skip to content

Conversation

costdev
Copy link
Member

@costdev costdev commented Jul 28, 2025

The documented type of MetadataDocument::$sections is string[] and it's defaulted to an empty array.

However, the value as received is actually an object, per the related section of the spec. While this is cast to an array in various other parts of the codebase, the documentation in MetadataDocument should match the actual value.

This PR changes the documented type to stdClass and removes the default value.

Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
@costdev costdev requested review from rmccue and afragen July 28, 2025 04:59
@costdev
Copy link
Member Author

costdev commented Jul 28, 2025

Alternatively, if this is always going to be treated as an associative array in the plugin, we could cast it to an array when it's received.

@rmccue rmccue merged commit 46bf451 into fairpm:main Jul 29, 2025
46 checks passed
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