Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"symfony/serializer": "^6.4|^7.1",
"symfony/stopwatch": "^6.4|^7.1",
"symfony/validator": "^6.4|^7.1",
"symfony/yaml": "^6.4|^7.1"
"symfony/yaml": "^6.4|^7.1",
"symfony/service-contracts": ">=1.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
Expand Down
8 changes: 7 additions & 1 deletion src/Model/AbstractConfigurableTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
namespace CleverAge\ProcessBundle\Model;

use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Contracts\Service\ResetInterface;

/**
* Allow the task to configure it's options, set default basic options for errors handling.
*/
abstract class AbstractConfigurableTask implements InitializableTaskInterface
abstract class AbstractConfigurableTask implements InitializableTaskInterface, ResetInterface
{
protected ?array $options = null;

Expand All @@ -30,6 +31,11 @@ public function initialize(ProcessState $state): void
$this->getOptions($state);
}

public function reset(): void
{
$this->options = null;
}

protected function getOptions(ProcessState $state): ?array
{
if (null === $this->options) {
Expand Down
Loading