Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dic(conf): triggers started #205

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

dic(conf): triggers started #205

wants to merge 10 commits into from

Conversation

Guikingone
Copy link
Owner

@Guikingone Guikingone commented Nov 9, 2021

Q A
PHP version? 7.4
Bundle version? 0.8.0
Symfony version? >= 5.2
New feature? yes
Bug fix? yes
Discussion? # ...

@Guikingone Guikingone self-assigned this Nov 9, 2021
@Guikingone Guikingone added Build Related to vendors and dependencies Improvement PHP scope: worker labels Nov 9, 2021
@Guikingone Guikingone added this to the 0.8.0 milestone Nov 9, 2021
@Guikingone Guikingone modified the milestones: 0.8.0, 0.9.0 Dec 6, 2021
Comment on lines +19 to +30
/**
* @var TriggerConfigurationInterface[]
*/
private iterable $configurationList;

/**
* @param TriggerConfigurationInterface[] $configurationList
*/
public function __construct(iterable $configurationList)
{
$this->configurationList = $configurationList;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* @var TriggerConfigurationInterface[]
*/
private iterable $configurationList;
/**
* @param TriggerConfigurationInterface[] $configurationList
*/
public function __construct(iterable $configurationList)
{
$this->configurationList = $configurationList;
}
/**
* @param TriggerConfigurationInterface[] $configurationList
*/
public function __construct(private iterable $configurationList)
{
}

Comment on lines +12 to +42
private bool $enabled;
private int $failureTriggeredAt;
private int $successTriggeredAt;
private ?string $failureFrom;
private ?string $successFrom;
private ?string $failureTo;
private ?string $successTo;
private string $failureSubject;
private string $successSubject;

public function __construct(
bool $enabled,
int $failureTriggeredAt,
int $successTriggeredAt,
string $failureSubject,
string $successSubject,
?string $failureFrom = null,
?string $successFrom = null,
?string $failureTo = null,
?string $successTo = null
) {
$this->enabled = $enabled;
$this->failureTriggeredAt = $failureTriggeredAt;
$this->successTriggeredAt = $successTriggeredAt;
$this->failureFrom = $failureFrom;
$this->successFrom = $successFrom;
$this->failureTo = $failureTo;
$this->successTo = $successTo;
$this->failureSubject = $failureSubject;
$this->successSubject = $successSubject;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private bool $enabled;
private int $failureTriggeredAt;
private int $successTriggeredAt;
private ?string $failureFrom;
private ?string $successFrom;
private ?string $failureTo;
private ?string $successTo;
private string $failureSubject;
private string $successSubject;
public function __construct(
bool $enabled,
int $failureTriggeredAt,
int $successTriggeredAt,
string $failureSubject,
string $successSubject,
?string $failureFrom = null,
?string $successFrom = null,
?string $failureTo = null,
?string $successTo = null
) {
$this->enabled = $enabled;
$this->failureTriggeredAt = $failureTriggeredAt;
$this->successTriggeredAt = $successTriggeredAt;
$this->failureFrom = $failureFrom;
$this->successFrom = $successFrom;
$this->failureTo = $failureTo;
$this->successTo = $successTo;
$this->failureSubject = $failureSubject;
$this->successSubject = $successSubject;
}
public function __construct(
private bool $enabled,
private int $failureTriggeredAt,
private int $successTriggeredAt,
private string $failureSubject,
private string $successSubject,
private ?string $failureFrom = null,
private ?string $successFrom = null,
private ?string $failureTo = null,
private ?string $successTo = null
) {
}

Comment on lines +26 to +40
private TaskListInterface $failedTasksList;
private TaskListInterface $succeedTasksList;
private ?MailerInterface $mailer;
private EmailTriggerConfiguration $emailTriggerConfiguration;

public function __construct(
EmailTriggerConfiguration $emailTriggerConfiguration,
?MailerInterface $mailer = null
) {
$this->emailTriggerConfiguration = $emailTriggerConfiguration;
$this->mailer = $mailer;

$this->failedTasksList = new TaskList();
$this->succeedTasksList = new TaskList();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private TaskListInterface $failedTasksList;
private TaskListInterface $succeedTasksList;
private ?MailerInterface $mailer;
private EmailTriggerConfiguration $emailTriggerConfiguration;
public function __construct(
EmailTriggerConfiguration $emailTriggerConfiguration,
?MailerInterface $mailer = null
) {
$this->emailTriggerConfiguration = $emailTriggerConfiguration;
$this->mailer = $mailer;
$this->failedTasksList = new TaskList();
$this->succeedTasksList = new TaskList();
}
private TaskListInterface $failedTasksList;
private TaskListInterface $succeedTasksList;
public function __construct(
private EmailTriggerConfiguration $emailTriggerConfiguration,
private ?MailerInterface $mailer = null
) {
$this->failedTasksList = new TaskList();
$this->succeedTasksList = new TaskList();
}

Comment on lines +21 to +36
private EventDispatcherInterface $eventDispatcher;
private LoggerInterface $logger;
private TriggerConfigurationRegistryInterface $triggerConfigurationRegistry;
private ?MailerInterface $mailer;

public function __construct(
EventDispatcherInterface $eventDispatcher,
TriggerConfigurationRegistryInterface $triggerConfigurationRegistry,
?LoggerInterface $logger = null,
?MailerInterface $mailer = null
) {
$this->eventDispatcher = $eventDispatcher;
$this->triggerConfigurationRegistry = $triggerConfigurationRegistry;
$this->logger = $logger ?? new NullLogger();

$this->mailer = $mailer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private EventDispatcherInterface $eventDispatcher;
private LoggerInterface $logger;
private TriggerConfigurationRegistryInterface $triggerConfigurationRegistry;
private ?MailerInterface $mailer;
public function __construct(
EventDispatcherInterface $eventDispatcher,
TriggerConfigurationRegistryInterface $triggerConfigurationRegistry,
?LoggerInterface $logger = null,
?MailerInterface $mailer = null
) {
$this->eventDispatcher = $eventDispatcher;
$this->triggerConfigurationRegistry = $triggerConfigurationRegistry;
$this->logger = $logger ?? new NullLogger();
$this->mailer = $mailer;
public function __construct(
private EventDispatcherInterface $eventDispatcher,
private TriggerConfigurationRegistryInterface $triggerConfigurationRegistry,
?LoggerInterface $logger = null,
private ?MailerInterface $mailer = null
) {
$this->logger = $logger ?? new NullLogger();

@Guikingone Guikingone modified the milestones: 0.9.0, 0.10.0 Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Related to vendors and dependencies Improvement PHP scope: worker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants