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

Discuss a misleading message: "Value expected to be 'array', 'array' given." #92

Closed
wants to merge 1 commit into from

Conversation

lezhnev74
Copy link
Contributor

Here is a problem found, see the diff.
The message is quite misleading, however it comes from the fact that "objects" and "arrays" in json are represented as just "arrays" in PHP...
what do we do with this?

@@ -20,6 +20,7 @@ public function validDataProvider() : array
['string', null, 'string value'],
['object', null, ['a' => 1]],
['array', null, ['a', 'b']],
['array', null, ['0' => 'a', '2' => 'b']], // this triggers: "Value expected to be 'array', 'array' given."
Copy link
Member

Choose a reason for hiding this comment

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

actually object given should be raised here. but we have an issue about this already, I hope

Copy link
Member

Choose a reason for hiding this comment

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

yea, this one #25

@lezhnev74
Copy link
Contributor Author

already a discussion in #25

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