Release 2.32 (#5411)

* bump packages
* dynamic invoice options
* make sure that invoice previews can be detected
* support for mpdf associated files
* do not include any future times in work contract calculation
* re-add username column in Excel spreadsheet
* deactivate internal rate editing
* show if plugin update exists
* shorten name to Kimai only, without Time-Tracking
* remove check for existing id in work contract
* fix metafield already defined in search
* helper methods to unlock months
* new translation
* send event on unlock month
This commit is contained in:
Kevin Papst
2025-04-06 09:53:48 +02:00
committed by GitHub
parent 2a75cd6230
commit 2e6b700b43
58 changed files with 749 additions and 437 deletions

View File

@@ -15,7 +15,7 @@ use Symfony\Contracts\EventDispatcher\Event;
final class InvoiceCreatedEvent extends Event
{
public function __construct(private Invoice $invoice, private InvoiceModel $model)
public function __construct(private readonly Invoice $invoice, private readonly InvoiceModel $model)
{
}

View File

@@ -47,6 +47,9 @@ final class InvoiceDocumentsEvent extends Event
$this->documents = $documents;
}
/**
* @CloudRequired
*/
public function setMaximumAllowedDocuments(int $max): void
{
$this->maximum = $max;

View File

@@ -16,7 +16,11 @@ use Symfony\Contracts\EventDispatcher\Event;
final class InvoicePreRenderEvent extends Event
{
public function __construct(private InvoiceModel $model, private InvoiceDocument $document, private RendererInterface $renderer)
public function __construct(
private readonly InvoiceModel $model,
private readonly InvoiceDocument $document,
private readonly RendererInterface $renderer
)
{
}

View File

@@ -11,6 +11,9 @@ namespace App\Event;
use Symfony\Contracts\EventDispatcher\Event;
/**
* @deprecated since 2.32 - use TranslatorInterface directly
*/
final class ThemeJavascriptTranslationsEvent extends Event
{
/**

View File

@@ -15,13 +15,19 @@ use Symfony\Contracts\EventDispatcher\Event;
final class WorkingTimeApproveMonthEvent extends Event
{
public function __construct(private User $user, private Month $month, private \DateTimeInterface $approvalDate, private User $approver)
public function __construct(
private readonly Month $month,
private readonly User $approvedBy
)
{
}
/**
* @deprecated use getMonth()->getUser() instead)
*/
public function getUser(): User
{
return $this->user;
return $this->getMonth()->getUser();
}
public function getMonth(): Month
@@ -29,13 +35,8 @@ final class WorkingTimeApproveMonthEvent extends Event
return $this->month;
}
public function getApprovalDate(): \DateTimeInterface
public function getApprovedBy(): User
{
return $this->approvalDate;
}
public function getApprover(): User
{
return $this->approver;
return $this->approvedBy;
}
}

View File

@@ -0,0 +1,34 @@
<?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\Event;
use App\Entity\User;
use App\WorkingTime\Model\Month;
use Symfony\Contracts\EventDispatcher\Event;
final class WorkingTimeUnlockMonthEvent extends Event
{
public function __construct(
private readonly Month $month,
private readonly User $unlockedBy
)
{
}
public function getMonth(): Month
{
return $this->month;
}
public function getUnlockedBy(): User
{
return $this->unlockedBy;
}
}