Skip to content

Commit

Permalink
Added replacement suggestions for some deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Staubiii authored Jul 22, 2024
1 parent 329733e commit 4a6884d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Traits/ModifierTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ public function endOfDay(bool $microseconds = false): ChronosInterface
public function startOfMonth(): ChronosInterface
{
if (static::class === ChronosDate::class) {
trigger_error('2.5 startOfMonth() will be removed in 3.x.', E_USER_DEPRECATED);
trigger_error('2.5 startOfMonth() will be removed in 3.x. Use firstOfMonth() instead.', E_USER_DEPRECATED);
}

return $this->modify('first day of this month midnight');
Expand All @@ -949,7 +949,7 @@ public function startOfMonth(): ChronosInterface
public function endOfMonth(): ChronosInterface
{
if (static::class === ChronosDate::class) {
trigger_error('2.5 endOfMonth() will be removed in 3.x.', E_USER_DEPRECATED);
trigger_error('2.5 endOfMonth() will be removed in 3.x. Use lastOfMonth() instead.', E_USER_DEPRECATED);
}

return $this->modify('last day of this month, 23:59:59');
Expand All @@ -963,7 +963,7 @@ public function endOfMonth(): ChronosInterface
public function startOfYear(): ChronosInterface
{
if (static::class === ChronosDate::class) {
trigger_error('2.5 startOfYear() will be removed in 3.x.', E_USER_DEPRECATED);
trigger_error('2.5 startOfYear() will be removed in 3.x. Use firstOfYear() instead.', E_USER_DEPRECATED);
}

return $this->modify('first day of january midnight');
Expand All @@ -977,7 +977,7 @@ public function startOfYear(): ChronosInterface
public function endOfYear(): ChronosInterface
{
if (static::class === ChronosDate::class) {
trigger_error('2.5 endOfYear() will be removed in 3.x.', E_USER_DEPRECATED);
trigger_error('2.5 endOfYear() will be removed in 3.x. Use lastOfYear() instead.', E_USER_DEPRECATED);
}

return $this->modify('last day of december, 23:59:59');
Expand Down

0 comments on commit 4a6884d

Please sign in to comment.