Skip to content

[OptionsResolver] Exception doesn't report the actual type used #11020

Closed
@cleentfaar

Description

@cleentfaar

Whenever you pass a value with the wrong type to the OptionsResolver, it throws an exception like below:

Symfony\Component\OptionsResolver\Exception\InvalidOptionsException: The option "my_option" with value "" is expected to be of type "bool"

This isn't really helpful however, since you cannot really see what was actually compared against (the actual type passed to the resolver).

I'm writing a patch as we speak to fix this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions