Option::fromValue uses the same type parameter C for the $value and $noneValue parameters. As a result, the type of C is inferred to a union of the types of $value and $noneValue:
https://phpstan.org/r/af2d3270-93fe-463a-9a29-4dd584012cc3
Typing $noneValue to mixed fixes the problem:
https://phpstan.org/r/c105ea3e-21e2-4dbc-a119-36fd1154ef3e
I believe that this would be ok since $noneValue doesn't contribute to type of Option.