Valinor/tests
Romain Canon ecafba3b21 feat!: introduce method to register constructors used during mapping
It is now mandatory to explicitly register custom constructors —
including named constructors — that can be used by the mapper. The
former automatic registration of named constructor feature doesn't
work anymore.

BREAKING CHANGE: existing code must list all named constructors that
were previously automatically used by the mapper, and registerer them
using the method `MapperBuilder::registerConstructor()`.

The method `MapperBuilder::bind()` has been deprecated, the method above
should be used instead.

```php
final class SomeClass
{
    public static function namedConstructor(string $foo): self
    {
        // …
    }
}

(new \CuyZ\Valinor\MapperBuilder())
    ->registerConstructor(
        SomeClass::namedConstructor(...),
        // …or for PHP < 8.1:
        [SomeClass::class, 'namedConstructor'],
    )
    ->mapper()
    ->map(SomeClass::class, [
        // …
    ]);
```
2022-03-24 13:03:55 +01:00
..
Fake misc: handle class name in function definition 2022-03-17 21:41:08 +01:00
Fixture fix: handle parameter default object value compilation 2022-03-09 10:33:40 +01:00
Functional misc: handle class name in function definition 2022-03-17 21:41:08 +01:00
Integration feat!: introduce method to register constructors used during mapping 2022-03-24 13:03:55 +01: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 method to register constructors used during mapping 2022-03-24 13:03:55 +01:00