Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Enhancement: Better target type validation #30

Description

@sommmen

Hiya,

I just ran into an issue where i tried to assign an array of strings to a string. This caused a weird error in MakeObject() because it was trying to construct a string.

a:1:{i:0;s:1:"a";}

To string.

Anyhow i spent some time what the issue was (from a lib consumer pov) and then found out the target type was just wrong. I feel like we can improve the validation a bit in this regard, where if i get a php array string and try to assign it to a string or int or w/e i get a specialized exception rather than something vague. (in this case it tried to construct the string in .MakeObject() which it can't.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions