File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff 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+ ` ` `
You can’t perform that action at this time.
0 commit comments