Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stdClass input values for ArrayHash properties #9

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

aimeos
Copy link
Contributor

@aimeos aimeos commented Mar 4, 2023

When model properties are cased to object and added as ArrayHash in JSON schema class, validation currently fails with an exception. This PR checks for stdClass objects which are the result of (object) $value casts and casts them back to an array.

@lindyhopchris
Copy link
Contributor

Thanks for this, happy to get this added.

@lindyhopchris lindyhopchris merged commit 8578500 into laravel-json-api:develop Mar 12, 2023
@lindyhopchris
Copy link
Contributor

@aimeos I tagged this as v3.1.0 of the core package. So if you update your Laravel JSON:API dependencies using the following command, you'll get this feature:

composer up "laravel-json-api/*"

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