automapper
automapper copied to clipboard
:rocket: Very FAST :rocket: PHP AutoMapper with on the fly code generation
This is not a final implementation, just the way to expose the issue. When querying MongoDB, documents are returned as [`MongoDB\BSON\Document`](https://www.php.net/manual/en/class.mongodb-bson-document.php). This generic class implements `ArrayAccess`, it can contain any...
fixes problem raised [here](https://github.com/jolicode/automapper/pull/129#discussion_r1599499557)
Hello What do you think about adding a time information like proposed in Symfony's Serializer bundle ?  This would give us a quick indication of which mapping is slow...
configuration `map_private_properties` was not used to configure service `automapper.property_info.reflection_extractor` whereas without the bundle, `\AutoMapper\Configuration::$mapPrivateProperties` is actually used, this PR fixes this. I had to introduce a way to have several...
This introduce the possibility to do lazy mapping The following call : ``` $userDto = $this->autoMapper->map($user, Fixtures\UserDTO::class, [MapperContext::LAZY_MAPPING => true]); ``` Will produce a lazy ghost object for userDto which...
Inspired from https://docs.automapper.org/en/stable/Flattening.html The idea is to makes simpler DTO compared to your source entities (or whatever your source is). Let's do a quick example: ```php // source class User...
I think what is done by valinor with attributes is pretty nice: https://twitter.com/Rommsteinz/status/1739673469724299392?t=5oVgUTC1atb1UacsHkB_bw We should be able to leverage some concept like this in automapper
## Description I would like to map using nested properties for array to object mapping in the current implementation. ### Example Given an input array: ```php [ 'saved_at' => '2024-01-01',...
There can be race condition when multiple php process would generate the class at the same time, so we add a lock here to avoid this problem [Better diff with...
Seem that we have no setter in stmt in this case when source is a array  (i've add count($propStatements) ) If transformer is a ArrayTransformer => OK , if...