automapper icon indicating copy to clipboard operation
automapper copied to clipboard

:rocket: Very FAST :rocket: PHP AutoMapper with on the fly code generation

Results 44 automapper issues
Sort by recently updated
recently updated
newest added

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 ? ![image](https://github.com/jolicode/automapper/assets/72203064/7e09f68e-2688-4a5d-87bc-3546793e964c) This would give us a quick indication of which mapping is slow...

good first issue
pr welcome

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

enhancement

## 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',...

documentation

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 ![image](https://github.com/jolicode/automapper/assets/50957749/7b7c486d-13a4-448b-91d6-e5df344138ea) (i've add count($propStatements) ) If transformer is a ArrayTransformer => OK , if...