From ec25446bcd2cc17a62db29a8ecf99862b39f6c12 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 31 May 2022 14:50:07 +0200 Subject: [PATCH] Remove deprecated dates property --- .../Eloquent/Concerns/HasAttributes.php | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php b/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php index dffc610fb54d..b4a0e87a4116 100644 --- a/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php +++ b/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php @@ -105,15 +105,6 @@ trait HasAttributes 'timestamp', ]; - /** - * The attributes that should be mutated to dates. - * - * @deprecated Use the "casts" property - * - * @var array - */ - protected $dates = []; - /** * The storage format of the model's date columns. * @@ -1366,16 +1357,10 @@ protected function serializeDate(DateTimeInterface $date) */ public function getDates() { - if (! $this->usesTimestamps()) { - return $this->dates; - } - - $defaults = [ + return $this->usesTimestamps() ? [ $this->getCreatedAtColumn(), $this->getUpdatedAtColumn(), - ]; - - return array_unique(array_merge($this->dates, $defaults)); + ] : []; } /**