Release 2.42 (#5686)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user