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

@@ -183,7 +183,7 @@ class TimesheetTest extends TestCase
$sut->setExported(true);
$sut->setDescription('Invalid timesheet category "foo" given, expected one of: work, holiday, sickness, parental, overtime');
$modifiedDate = new \DateTime();
$modifiedDate = new \DateTimeImmutable();
$reflection = new \ReflectionClass($sut);
$property = $reflection->getProperty('modifiedAt');

View File

@@ -219,7 +219,7 @@ class UserTest extends TestCase
public function testPasswordRequestedAt(): void
{
$date = new \DateTime('-60 minutes');
$date = new \DateTimeImmutable('-60 minutes');
$sut = new User();
self::assertFalse($sut->isPasswordRequestNonExpired(3599));

View File

@@ -22,7 +22,7 @@ class WorkingTimeTest extends TestCase
{
$user = new User();
$user->setUsername('bar');
$date = new \DateTime();
$date = new \DateTimeImmutable();
$sut = new WorkingTime($user, $date);
self::assertSame($user, $sut->getUser());
@@ -36,7 +36,7 @@ class WorkingTimeTest extends TestCase
self::assertNull($sut->getApprovedBy());
self::assertFalse($sut->isApproved());
$approvedAt = new \DateTime('2023-01-01 12:00:00', new \DateTimeZone('Europe/Vienna'));
$approvedAt = new \DateTimeImmutable('2023-01-01 12:00:00', new \DateTimeZone('Europe/Vienna'));
$approvedBy = new User();
$approvedBy->setUsername('foo');