File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ class HelloCommand extends Command
3737```
3838
3939Command classes must implement an ` execute() ` method that does the bulk of
40- their work. This method is called when a command is invoked. Let's call our first
41- command application directory, run:
40+ their work. This method is called when a command is invoked. Let's call our
41+ first command. From your application directory, run:
4242
4343``` bash
4444bin/cake hello
@@ -48,6 +48,16 @@ You should see the following output:
4848
4949 Hello world.
5050
51+ ::: info
52+ The ` Arguments ` and ` ConsoleIo ` instances passed to ` execute() ` are also
53+ available on the command instance as ` $this->args ` and ` $this->io ` .
54+ In 6.x, the ` execute() ` method signature will drop these arguments
55+ and ` $this->args ` / ` $this->io ` will be the only way to access
56+ these objects. See the
57+ [ 6.x command refactor] ( https://github.com/cakephp/cakephp/pull/18983 ) for
58+ details.
59+ :::
60+
5161Our ` execute() ` method isn't very interesting let's read some input from the
5262command line:
5363
You can’t perform that action at this time.
0 commit comments