Skip to content

Commit e8071be

Browse files
committed
ICM: Troubleshooting section added.
1 parent 086ef4a commit e8071be

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,36 @@ class Foo extends Command
8080
}
8181
8282
```
83+
84+
## Troubleshooting
85+
86+
Note, that `WithoutOverlapping` trait is overriding `initialize` method:
87+
```php
88+
trait WithoutOverlapping
89+
{
90+
protected function initialize(InputInterface $input, OutputInterface $output)
91+
{
92+
$this->initializeMutex();
93+
}
94+
95+
// ...
96+
}
97+
```
98+
99+
If your command is overriding `initialize` method too, then you should call `initializeMutex` method by yourself:
100+
```php
101+
class Foo extends Command
102+
{
103+
use WithoutOverlapping;
104+
105+
protected function initialize(InputInterface $input, OutputInterface $output)
106+
{
107+
$this->initializeMutex();
108+
109+
$this->bar = $this->argument('bar');
110+
$this->baz = $this->argument('baz');
111+
}
112+
113+
// ...
114+
}
115+
```

0 commit comments

Comments
 (0)