Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract data objects not encrypted #828

Closed
kiwina opened this issue Jul 20, 2024 · 1 comment
Closed

Abstract data objects not encrypted #828

kiwina opened this issue Jul 20, 2024 · 1 comment

Comments

@kiwina
Copy link

kiwina commented Jul 20, 2024

✏️ Describe the bug
Abstract data objects are not encrypted and trows error when decrypting

↪️ To Reproduce

abstract class RecordConfig extends Data
{
    public function __construct(
        public int $tracks,
    ) {}
}

class CdRecordConfig extends RecordConfig
{
    public function __construct(
        int $tracks
        public int $bytes,
    ) {
        parent::__construct($tracks);
    }
}

class VinylRecordConfig extends RecordConfig
{
    public function __construct(
        int $tracks
        public int $rpm,
    ) {
        parent::__construct($tracks);
    }
}

class Record extends Model
{
    protected $casts = [
        'config' => RecordConfig::class . ':encrypted',
    ];
}

✅ Expected behavior
Encrypted data

🖥️ Versions

Laravel: 11

@rubenvanassche
Copy link
Member

Fixed with 90dd07b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants