I'm unable to use shape with nullable non-empty-string (as well as union(null(), non_empty_string()). I'm not sure if the issue is in the extension or in the phpstan itself.
/** @param array{foo: non-empty-string, bar: non-empty-string|null} $arr */
function test(array $arr) {}
$arr = shape([
'foo' => non_empty_string(),
'bar' => nullable(non_empty_string()),
])->coerce($input);
test($arr);
Expects: array{foo: non-empty-string, bar: non-empty-string|null}, array{foo: non-empty-string, bar: string|null}. given