Open
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Type\shape(['foo' => Type\string()], true)->assert([]);
Type\shape(['foo' => Type\string()], true)->assert(['foo' => null]);
Both these two evaluations result in a AssertException
with a Expected "array{'foo': string}", got "null" at path "foo".
message.
It's misleading as the lack of the key is definitely different beast to the key that is = null
.
Describe the solution you'd like
I would prefer two distinct messages (non-native speaker here, so needs polishing):
Expected "array{'foo': string}", path "foo" does not exist.
Expected "array{'foo': string}", got "null" at path "foo".
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.