Release 2.2.0 (#4359)

* deactivate deprecation logging in prod for now
* fix several deprecations
* enable CSRF for logout
* allow more twig methods and functions in InvoiceSecurity policy
This commit is contained in:
Kevin Papst
2023-10-31 16:41:09 +01:00
committed by GitHub
parent 114617a052
commit 95f15e6c88
22 changed files with 396 additions and 324 deletions

View File

@@ -18,7 +18,7 @@ use App\Model\Month as BaseMonth;
*/
final class Month extends BaseMonth
{
public function __construct(\DateTimeInterface $month, private User $user)
public function __construct(\DateTimeImmutable $month, private User $user)
{
parent::__construct($month);
}
@@ -67,7 +67,7 @@ final class Month extends BaseMonth
return null;
}
protected function createDay(\DateTimeInterface $day): Day
protected function createDay(\DateTimeImmutable $day): Day
{
return new Day($day);
}

View File

@@ -28,7 +28,7 @@ final class Year extends BaseYear
return $this->user;
}
protected function createMonth(\DateTimeInterface $month): Month
protected function createMonth(\DateTimeImmutable $month): Month
{
return new Month($month, $this->user);
}

View File

@@ -117,7 +117,8 @@ final class WorkingTimeService
}
$workingTime->setApprovedBy($approver);
$workingTime->setApprovedAt($approvalDate);
// FIXME see calling method
$workingTime->setApprovedAt(\DateTimeImmutable::createFromInterface($approvalDate));
$this->workingTimeRepository->scheduleWorkingTimeUpdate($workingTime);
}