ObjectHydrator icon indicating copy to clipboard operation
ObjectHydrator copied to clipboard

Update mapper variable name in PropertyCaster

Open shadowhand opened this issue 2 years ago • 1 comments

The current definition has a variable named "hydrator":

interface PropertyCaster
{
    public function cast(mixed $value, ObjectMapper $hydrator): mixed;
}

It used to be that ObjectMapper was called ObjectHydrator, which is likely why this variable has the name it does. Changing this will require a major release, but I think it should be:

interface PropertyCaster
{
    public function cast(mixed $value, ObjectMapper $mapper): mixed;
}

My editor would really like this, because it doesn't think "hydrator" is a word. And of course, it would make the signature more consistent.

shadowhand avatar Dec 15 '23 17:12 shadowhand

This will be handled in league/object-mapper

frankdejonge avatar Dec 16 '23 09:12 frankdejonge