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

Using protected $dates attribute is depreciated #1453

Closed
MatthewMusicplayOnline opened this issue Oct 11, 2022 · 1 comment
Closed

Using protected $dates attribute is depreciated #1453

MatthewMusicplayOnline opened this issue Oct 11, 2022 · 1 comment

Comments

@MatthewMusicplayOnline
Copy link

  • Cashier Version: newest
  • Laravel Version: 9.25.1
  • PHP Version: PHP 8.1.7

Subscription model uses protected $dates = [] attribute to convert date strings to Carbon objects for 'created_at', 'ends_at', 'trial_ends_at', 'updated_at'.

This dates array was deprecated in Laravel 5.0
https://laravel.com/api/9.x/Illuminate/Database/Eloquent/Model.html

It's been replaced with casts, ex.
protected $casts = [
'trial_ends_at' => 'datetime'
];

@driesvints
Copy link
Member

Thanks. I sent in a PR to remove this: #1462

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