Release 2.42 (#5686)

This commit is contained in:
Kevin Papst
2025-11-12 16:15:04 +01:00
committed by GitHub
parent ea29799b89
commit 8e6764b67a
42 changed files with 377 additions and 416 deletions

View File

@@ -17,7 +17,7 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
abstract class AbstractActivityEvent extends Event
{
public function __construct(private Activity $activity)
public function __construct(private readonly Activity $activity)
{
}

View File

@@ -17,7 +17,7 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
abstract class AbstractCustomerEvent extends Event
{
public function __construct(private Customer $customer)
public function __construct(private readonly Customer $customer)
{
}

View File

@@ -17,7 +17,7 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
abstract class AbstractProjectEvent extends Event
{
public function __construct(private Project $project)
public function __construct(private readonly Project $project)
{
}

View File

@@ -9,9 +9,19 @@
namespace App\Event;
use App\Entity\Activity;
use App\Webhook\Attribute\AsWebhook;
#[AsWebhook(name: 'activity.deleted', description: 'Triggered right before an activity will be deleted', payload: 'object.getActivity()')]
final class ActivityDeleteEvent extends AbstractActivityEvent
{
public function __construct(Activity $activity, private readonly ?Activity $replacementActivity = null)
{
parent::__construct($activity);
}
public function getReplacementActivity(): ?Activity
{
return $this->replacementActivity;
}
}

View File

@@ -17,7 +17,7 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
final class ActivityMetaDefinitionEvent extends Event
{
public function __construct(private Activity $entity)
public function __construct(private readonly Activity $entity)
{
}

View File

@@ -9,9 +9,19 @@
namespace App\Event;
use App\Entity\Customer;
use App\Webhook\Attribute\AsWebhook;
#[AsWebhook(name: 'customer.deleted', description: 'Triggered right before a customer will be deleted', payload: 'object.getCustomer()')]
final class CustomerDeleteEvent extends AbstractCustomerEvent
{
public function __construct(Customer $customer, private readonly ?Customer $replacementCustomer = null)
{
parent::__construct($customer);
}
public function getReplacementCustomer(): ?Customer
{
return $this->replacementCustomer;
}
}

View File

@@ -17,7 +17,7 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
final class CustomerMetaDefinitionEvent extends Event
{
public function __construct(private Customer $entity)
public function __construct(private readonly Customer $entity)
{
}

View File

@@ -9,9 +9,19 @@
namespace App\Event;
use App\Entity\Project;
use App\Webhook\Attribute\AsWebhook;
#[AsWebhook(name: 'project.deleted', description: 'Triggered right before a project will be deleted', payload: 'object.getProject()')]
final class ProjectDeleteEvent extends AbstractProjectEvent
{
public function __construct(Project $project, private readonly ?Project $replacementProject = null)
{
parent::__construct($project);
}
public function getReplacementProject(): ?Project
{
return $this->replacementProject;
}
}

View File

@@ -17,7 +17,7 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
final class ProjectMetaDefinitionEvent extends Event
{
public function __construct(private Project $entity)
public function __construct(private readonly Project $entity)
{
}