diff --git a/src/Traits/FrozenTimeTrait.php b/src/Traits/FrozenTimeTrait.php index 93e1cedc..198ab7b0 100644 --- a/src/Traits/FrozenTimeTrait.php +++ b/src/Traits/FrozenTimeTrait.php @@ -218,19 +218,4 @@ public function modify($relative): ChronosInterface return $new; } - - /** - * @param int $year The year. - * @param int $week The week number. - * @param int $dayOfWeek Day of the week. - * @return mixed - * @deprecated - */ - #[ReturnTypeWillChange] - public function setISODate($year, $week, $dayOfWeek = 1) - { - trigger_error('2.5 setISODate will be removed in 3.x'); - - return parent::setISODate($year, $week, $dayOfWeek); - } } diff --git a/tests/TestCase/Date/DateMutabilityConversionTest.php b/tests/TestCase/Date/DateMutabilityConversionTest.php index 873b4fcb..79d56727 100644 --- a/tests/TestCase/Date/DateMutabilityConversionTest.php +++ b/tests/TestCase/Date/DateMutabilityConversionTest.php @@ -74,6 +74,14 @@ public function testIsMutableMethod() }); } + public function testSetISODate() + { + $date = ChronosDate::create(2001, 1, 1); + $new = $date->setISODate(2023, 17, 3); + $this->assertSame('00:00:00', $new->format('H:i:s')); + $this->assertSame('2023-04-26', $new->format('Y-m-d')); + } + protected function checkBothInstances(MutableDate $dt1, ChronosDate $dt2) { $this->assertDateTime($dt1, 2001, 2, 3, 0, 0, 0);