File tree 2 files changed +18
-1
lines changed
src/Symfony/Component/Console/Command
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,23 @@ Console
13
13
14
14
* Omitting parameter types in callables configured via ` Command::setCode ` method is deprecated
15
15
16
+ * Before*
17
+ ``` php
18
+ $command->setCode(function ($input, $output) {
19
+ // ...
20
+ });
21
+ ```
22
+
23
+ * After*
24
+ ``` php
25
+ use Symfony\Component\Console\Input\InputInterface;
26
+ use Symfony\Component\Console\Output\OutputInterface;
27
+
28
+ $command->setCode(function (InputInterface $input, OutputInterface $output) {
29
+ // ...
30
+ });
31
+ ```
32
+
16
33
FrameworkBundle
17
34
---------------
18
35
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ public function setCode(callable $code): static
328
328
$ code = $ code (...);
329
329
}
330
330
331
- $ this ->code = new InvokableCommand ($ this , $ code , true );
331
+ $ this ->code = new InvokableCommand ($ this , $ code , triggerDeprecations: true );
332
332
333
333
return $ this ;
334
334
}
You can’t perform that action at this time.
0 commit comments