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');
```
Using variadic parameters is now handled properly by the library,
meaning the following example will run:
```php
final class SomeClass
{
/** @var string[] */
private array $values;
public function __construct(string ...$values)
{
$this->values = $values;
}
}
(new \CuyZ\Valinor\MapperBuilder())
->mapper()
->map(SomeClass::class, ['foo', 'bar', 'baz']);
```
This abstraction layer was not useful, so it is removed to simplify the
API around `ClassDefinition`.
A new method `ClassDefinition::type()` is also added, giving access to
the `ClassType` instance when working with a class definition.