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

Added replacement suggestions for some deprecated functions #458

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading