✏️ Describe the bug
If extends is Dto and not Data, a DataVarDumperCaster error occurs.
The contents cannot be checked with dump or dd.
↪️ To Reproduce
class BaseData extends Dto
{
public function __construct(
public int $age,
) {
}
}
$BaseData = new BaseData(age: 1);
dd($BaseData);
✅ Expected behavior
Spatie\LaravelData\Support\VarDumper\DataVarDumperCaster::castDataObject(): Argument #1 ($data) must be of type Spatie\LaravelData\Contracts\TransformableData, App\Services\Transaction\Data\TransactionData given, called in /var/www/vendor/symfony/var-dumper/Cloner/AbstractCloner.php on line 370
✏️ Describe the bug If extends is Dto and not Data, a DataVarDumperCaster error occurs.
The contents cannot be checked with dump or dd.
↪️ To Reproduce
✅ Expected behavior
🖥️ Versions
Laravel: 11 Laravel Data: 4.7.2 PHP: 8.3