Skip to content

Commit 51e42a1

Browse files
Merge pull request #161 from cleverage/158
#158 Add dependency to symfony/service-contract
2 parents b520cdb + 45ec09f commit 51e42a1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
"symfony/serializer": "^6.4|^7.1",
7171
"symfony/stopwatch": "^6.4|^7.1",
7272
"symfony/validator": "^6.4|^7.1",
73-
"symfony/yaml": "^6.4|^7.1"
73+
"symfony/yaml": "^6.4|^7.1",
74+
"symfony/service-contracts": ">=1.0.0"
7475
},
7576
"require-dev": {
7677
"friendsofphp/php-cs-fixer": "*",

src/Model/AbstractConfigurableTask.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
namespace CleverAge\ProcessBundle\Model;
1515

1616
use Symfony\Component\OptionsResolver\OptionsResolver;
17+
use Symfony\Contracts\Service\ResetInterface;
1718

1819
/**
1920
* Allow the task to configure it's options, set default basic options for errors handling.
2021
*/
21-
abstract class AbstractConfigurableTask implements InitializableTaskInterface
22+
abstract class AbstractConfigurableTask implements InitializableTaskInterface, ResetInterface
2223
{
2324
protected ?array $options = null;
2425

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

34+
public function reset(): void
35+
{
36+
$this->options = null;
37+
}
38+
3339
protected function getOptions(ProcessState $state): ?array
3440
{
3541
if (null === $this->options) {

0 commit comments

Comments
 (0)