CastWith
This commit is contained in:
parent
bef42b3352
commit
afb47c1977
7 changed files with 56 additions and 26 deletions
|
|
@ -5,7 +5,7 @@ declare(strict_types=1);
|
|||
namespace Tests\Classes;
|
||||
|
||||
use Carbon\CarbonPeriodImmutable;
|
||||
use Icefox\DTO\Attributes\FromMapper;
|
||||
use Icefox\DTO\Attributes\CastWith;
|
||||
use Icefox\DTO\DataObject;
|
||||
|
||||
readonly class WithMapperObject
|
||||
|
|
@ -13,7 +13,7 @@ readonly class WithMapperObject
|
|||
use DataObject;
|
||||
|
||||
public function __construct(
|
||||
#[FromMapper(CarbonPeriodMapper::class)]
|
||||
#[CastWith(CarbonPeriodMapper::class)]
|
||||
public CarbonPeriodImmutable $period,
|
||||
) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue