jolicode / automapper

:rocket: Very FAST :rocket: PHP AutoMapper with on the fly code generation
https://automapper.jolicode.com/
MIT License
154 stars 15 forks source link

fix: signature of Map attributes `transformer` property #199

Closed JorickPepin closed 3 weeks ago

JorickPepin commented 1 month ago

According to the PropertyTransformerInterface, the signature of a transformer should be:

/**
 * @param mixed                       $value   the value of the property to transform, can be null if there is no way to read the data from the mapping
 * @param object|array<string, mixed> $source  the source input on which the custom transformation applies
 * @param array<string, mixed>        $context Context during mapping
 */
public function transform(mixed $value, object|array $source, array $context): mixed;
joelwurtz commented 3 weeks ago

Thanks @JorickPepin