Valinor/tests/Unit
Romain Canon c37ac1e259 feat: handle abstract constructor registration
It is now possible to register a static method constructor that can be
inherited by a child class. The constructor will then be used correctly
to map the child class.

```php
abstract class ClassWithStaticConstructor
{
    public string $value;

    final private function __construct(string $value)
    {
        $this->value = $value;
    }

    public static function from(string $value): static
    {
        return new static($value);
    }
}

final class ChildClass extends ClassWithStaticConstructor {}

(new MapperBuilder())
    // The constructor can be used for every child of the parent class
    ->registerConstructor(ClassWithStaticConstructor::from(...))
    ->mapper()
    ->map(ChildClass::class, 'foo');
```
2022-08-29 23:09:15 +02:00
..
Cache feat: extract file watching feature in own cache implementation 2022-05-23 20:28:02 +02:00
Definition fix: handle inherited private constructor in class definition 2022-08-29 23:09:15 +02:00
Mapper feat: handle abstract constructor registration 2022-08-29 23:09:15 +02:00
Type feat: handle numeric string type 2022-07-25 22:34:05 +02:00
Utility misc: refactor arguments instantiation 2022-08-29 23:09:15 +02:00
MapperBuilderTest.php feat!: filter userland exceptions to hide potential sensible data 2022-07-08 13:58:48 +02:00