Valinor/tests
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
..
Fake misc: fetch attributes for function definition 2022-08-29 23:09:15 +02:00
Fixture fix: handle native attribute on promoted parameter 2022-07-31 15:42:58 +02:00
Functional fix: allow trailing comma in shaped array 2022-08-30 21:20:28 +02:00
Integration feat!: introduce constructor for custom date formats 2022-09-01 12:24:24 +02:00
StaticAnalysis test: configure vimeo/psalm to verify type inference 2022-01-13 19:55:20 +01:00
Traits feat: initial release 2021-11-28 18:21:56 +01:00
Unit feat!: introduce constructor for custom date formats 2022-09-01 12:24:24 +02:00