Release 2.38.0 (#5563)
This commit is contained in:
25
src/Event/AbstractInvoiceEvent.php
Normal file
25
src/Event/AbstractInvoiceEvent.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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\Invoice;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
class AbstractInvoiceEvent extends Event
|
||||
{
|
||||
public function __construct(private readonly Invoice $invoice)
|
||||
{
|
||||
}
|
||||
|
||||
public function getInvoice(): Invoice
|
||||
{
|
||||
return $this->invoice;
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for activity instances, which were just saved.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'activity.created', description: 'Triggered after a new activity was created', payload: 'object.getActivity()')]
|
||||
final class ActivityCreatePostEvent extends AbstractActivityEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered right before a activity will be deleted.
|
||||
*/
|
||||
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
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for activity instances, which were updated.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'activity.updated', description: 'Triggered after an activity was updated', payload: 'object.getActivity()')]
|
||||
final class ActivityUpdatePostEvent extends AbstractActivityEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for customer instances, which were just saved.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'customer.created', description: 'Triggered after a customer was created', payload: 'object.getCustomer()')]
|
||||
final class CustomerCreatePostEvent extends AbstractCustomerEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered right before a customer will be deleted.
|
||||
*/
|
||||
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
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for customer instances, which were just updated.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'customer.updated', description: 'Triggered after a customer was updated', payload: 'object.getCustomer()')]
|
||||
final class CustomerUpdatePostEvent extends AbstractCustomerEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -11,17 +11,14 @@ namespace App\Event;
|
||||
|
||||
use App\Entity\Invoice;
|
||||
use App\Invoice\InvoiceModel;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
final class InvoiceCreatedEvent extends Event
|
||||
#[AsWebhook(name: 'invoice.created', description: 'Triggered after an invoice was created', payload: 'object.getInvoice()')]
|
||||
final class InvoiceCreatedEvent extends AbstractInvoiceEvent
|
||||
{
|
||||
public function __construct(private readonly Invoice $invoice, private readonly InvoiceModel $model)
|
||||
public function __construct(Invoice $invoice, private readonly InvoiceModel $model)
|
||||
{
|
||||
}
|
||||
|
||||
public function getInvoice(): Invoice
|
||||
{
|
||||
return $this->invoice;
|
||||
parent::__construct($invoice);
|
||||
}
|
||||
|
||||
public function getInvoiceModel(): InvoiceModel
|
||||
|
||||
@@ -9,17 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
use App\Entity\Invoice;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
final class InvoiceDeleteEvent extends Event
|
||||
#[AsWebhook(name: 'invoice.deleted', description: 'Triggered after an invoice was deleted', payload: 'object.getInvoice()')]
|
||||
final class InvoiceDeleteEvent extends AbstractInvoiceEvent
|
||||
{
|
||||
public function __construct(private Invoice $invoice)
|
||||
{
|
||||
}
|
||||
|
||||
public function getInvoice(): Invoice
|
||||
{
|
||||
return $this->invoice;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ final class PermissionSectionsEvent extends Event
|
||||
/**
|
||||
* @var array<PermissionSectionInterface>
|
||||
*/
|
||||
private array $sections = [];
|
||||
private array $sections = []; // @phpstan-ignore property.deprecatedInterface
|
||||
|
||||
public function addSection(PermissionSectionInterface $section): PermissionSectionsEvent
|
||||
public function addSection(PermissionSectionInterface $section): PermissionSectionsEvent // @phpstan-ignore parameter.deprecatedInterface
|
||||
{
|
||||
$this->sections[] = $section;
|
||||
|
||||
@@ -32,7 +32,7 @@ final class PermissionSectionsEvent extends Event
|
||||
/**
|
||||
* @return PermissionSectionInterface[]
|
||||
*/
|
||||
public function getSections(): array
|
||||
public function getSections(): array // @phpstan-ignore return.deprecatedInterface
|
||||
{
|
||||
return $this->sections;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for project instances, which were just saved.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'project.created', description: 'Triggered after a project was created', payload: 'object.getProject()')]
|
||||
final class ProjectCreatePostEvent extends AbstractProjectEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered right before a project will be deleted.
|
||||
*/
|
||||
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
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for project instances, which were just updated.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'project.updated', description: 'Triggered after a project was updated', payload: 'object.getProject()')]
|
||||
final class ProjectUpdatePostEvent extends AbstractProjectEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ use App\Form\Model\SystemConfiguration;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* This event should be used, if system configurations should be changed/added dynamically.
|
||||
* Adjust system configurations dynamically.
|
||||
*/
|
||||
final class SystemConfigurationEvent extends Event
|
||||
{
|
||||
@@ -32,10 +32,6 @@ final class SystemConfigurationEvent extends Event
|
||||
return $this->configurations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SystemConfiguration $configuration
|
||||
* @return SystemConfigurationEvent
|
||||
*/
|
||||
public function addConfiguration(SystemConfiguration $configuration): SystemConfigurationEvent
|
||||
{
|
||||
$this->configurations[] = $configuration;
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'timesheet.created', description: 'Triggered after a timesheet was created', payload: 'object.getTimesheet()')]
|
||||
final class TimesheetCreatePostEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'timesheet.stopped', description: 'Triggered after a timesheet was stopped', payload: 'object.getTimesheet()')]
|
||||
final class TimesheetStopPostEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'timesheet.updated', description: 'Triggered after a timesheet was updated', payload: 'object.getTimesheet()')]
|
||||
final class TimesheetUpdatePostEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for new user instances, which were just saved.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'user.created', description: 'Triggered after a user was created', payload: 'object.getUser()')]
|
||||
final class UserCreatePostEvent extends AbstractUserEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for user instances which were just deleted.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'user.deleted', description: 'Triggered after a user was deleted', payload: 'object.getUser()')]
|
||||
final class UserDeletePostEvent extends UserDeleteEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
/**
|
||||
* Triggered for user instances, which were just updated.
|
||||
*/
|
||||
use App\Webhook\Attribute\AsWebhook;
|
||||
|
||||
#[AsWebhook(name: 'user.updated', description: 'Triggered after a user was updated', payload: 'object.getUser()')]
|
||||
final class UserUpdatePostEvent extends AbstractUserEvent
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user