Valinor/tests/Unit/Mapper/Object
Romain Canon f232cc0636 feat!: introduce constructor for custom date formats
A new constructor can be registered to declare which format(s) are
supported during the mapping of a date object. By default, any valid
timestamp or ATOM-formatted value will be accepted.

```php
(new \CuyZ\Valinor\MapperBuilder())
    // Both COOKIE and ATOM formats will be accepted
    ->registerConstructor(
        new \CuyZ\Valinor\Mapper\Object\DateTimeFormatConstructor(DATE_COOKIE, DATE_ATOM)
    )
    ->mapper()
    ->map(DateTimeInterface::class, 'Monday, 08-Nov-1971 13:37:42 UTC');
```

The previously very opinionated behaviour has been removed, but can be
temporarily used to help with the migration.

```php
(new \CuyZ\Valinor\MapperBuilder())
    ->registerConstructor(
        new \CuyZ\Valinor\Mapper\Object\BackwardCompatibilityDateTimeConstructor()
    )
    ->mapper()
    ->map(DateTimeInterface::class, 'Monday, 08-Nov-1971 13:37:42 UTC');
```
2022-09-01 12:24:24 +02:00
..
Factory feat!: make mapper more strict and allow flexible mode 2022-06-23 10:30:36 +02:00
FunctionObjectBuilderTest.php feat: introduce attribute DynamicConstructor 2022-08-30 15:15:41 +02:00
MethodArgumentsTest.php misc: remove types stringable behavior 2022-07-13 21:44:07 +02:00
MethodObjectBuilderTest.php feat: handle abstract constructor registration 2022-08-29 23:09:15 +02:00
NativeConstructorObjectBuilderTest.php misc: extract native constructor object builder 2022-08-29 23:09:15 +02:00
ReflectionObjectBuilderTest.php misc: introduce layer for object builder arguments 2022-05-21 16:30:24 +02:00