korbeil / automapper-bootstrap
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/korbeil/automapper-bootstrap
Requires
- doctrine/annotations: ^1.11
- jane-php/automapper: dev-next
- phpdocumentor/reflection-docblock: ^5.2
This package is auto-updated.
Last update: 2025-09-29 02:43:40 UTC
README
Simple bootstrap to use Jane's AutoMapper.
It will configure the AutoMapper to work on a "normal" environnement (where normal is defined by my usual standards) and in a standalone mode. If you want to use the AutoMapper with Symfony, please use the corresponding bundle.
How to use:
use Korbeil\AutoMapperBootstrap\AutoMapper; $autoMapper = AutoMapper::bootstrap(__DIR__ . '/cache'); class User { public string $name; public int $age; } $data = [ 'name' => 'Baptiste', 'age' => 29 ]; $user = $autoMapper->map($data, User::class); //object(User)#1286 (2) { // ["name"]=> // string(8) "Baptiste" // ["age"]=> // int(29) //}