Release 2.9.0 (#4526)

* added fix to work around bc break in new phpword version
* fix phpoffice deprecations
* mark unused option as deprecated
* support for DateTimeInterface and DateTimeImmutable where possible
* use TRUSTED_PROXIES setting - fixes #4533
* re-enable Kimai test in docker test build script (#4541)
* bump dependencies
This commit is contained in:
Kevin Papst
2024-01-10 12:43:07 +01:00
committed by GitHub
parent c6a651456e
commit 6531e7fe52
46 changed files with 487 additions and 485 deletions

View File

@@ -0,0 +1,30 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Repository\Query;
use App\Form\Model\DateRange;
/**
* @internal
*/
interface DateRangeInterface
{
public function getBegin(): ?\DateTime;
public function setBegin(\DateTimeInterface $begin): void;
public function getEnd(): ?\DateTime;
public function setEnd(\DateTimeInterface $end): void;
public function getDateRange(): ?DateRange;
public function setDateRange(DateRange $dateRange): void;
}

View File

@@ -20,9 +20,9 @@ trait DateRangeTrait
return $this->dateRange?->getBegin();
}
public function setBegin(\DateTime $begin): void
public function setBegin(\DateTimeInterface $begin): void
{
$this->dateRange->setBegin($begin);
$this->dateRange->setBegin(\DateTime::createFromInterface($begin));
}
public function getEnd(): ?\DateTime
@@ -30,9 +30,9 @@ trait DateRangeTrait
return $this->dateRange?->getEnd();
}
public function setEnd(\DateTime $end): void
public function setEnd(\DateTimeInterface $end): void
{
$this->dateRange->setEnd($end);
$this->dateRange->setEnd(\DateTime::createFromInterface($end));
}
public function getDateRange(): ?DateRange

View File

@@ -16,7 +16,7 @@ use App\Form\Model\DateRange;
/**
* Query for created invoices.
*/
class InvoiceArchiveQuery extends BaseQuery
class InvoiceArchiveQuery extends BaseQuery implements DateRangeInterface
{
use DateRangeTrait;

View File

@@ -14,7 +14,7 @@ use App\Entity\Tag;
use App\Entity\User;
use App\Form\Model\DateRange;
class TimesheetQuery extends ActivityQuery implements BillableInterface
class TimesheetQuery extends ActivityQuery implements BillableInterface, DateRangeInterface
{
use BillableTrait;
use DateRangeTrait;