@@ -8,24 +8,110 @@ The CLI component is available in `bin/console` file, you can watch listed comma
8
8
bin/console
9
9
````
10
10
11
- ![ Command list] ( /../images/cli-list.jpg )
11
+ ![ Command list] ( /../images/cli-list.png )
12
12
13
13
## Show Container Command
14
14
15
- ```` php
16
- bin console config:show:container
17
- ````
18
- ![ Show container command] ( /../images/cli-show-container.jpg )
15
+ Shows all configured dependencies in a table.
16
+
17
+ ``` bash
18
+ bin/console config:show:container
19
+ ```
20
+ ![ Show container command] ( /../images/cli-show-container.png )
19
21
20
22
## Clear Config Cache
21
23
22
- ```` php
23
- bin console config:clear-cache
24
- ````
24
+ Removes all files at configured cache directory, by default in keys 'config_cache_path' and '''cli_config_cache_path'.
25
+
26
+ ``` bash
27
+ bin/console config:clear-cache
28
+ ```
29
+ ![ Clear Config Cache command] ( /../images/clear-config-cache.png )
30
+
31
+ ## Development mode
32
+
33
+ Enables and disables development mode.
34
+
35
+ ### Enable Development mode
36
+
37
+ ``` bash
38
+ bin/console config:development-mode
39
+ ```
40
+ ![ Enable Development Mode command] ( /../images/enable-development-mode.png )
41
+
42
+ ### Disable Development mode
43
+
44
+ ``` bash
45
+ bin/console config:development-mode --disable=true
46
+ ```
47
+ ![ Disable Development Mode command] ( /../images/disable-development-mode.png )
48
+
49
+ ## Maker Commands
50
+
51
+ It has a set of useful CLI commands to facilitate the creation of different types of classes.
52
+
53
+ ### Make PSR-7 Request Handler
54
+
55
+ Generates an instance of Psr\Http\Server\RequestHandlerInterface and allocates in its place on the filesystem
56
+ respecting the given full qualified classname
57
+
58
+ ``` bash
59
+ bin/console make:request-handler ' App\Application\Http\Handler\TestRequestHandler'
60
+ ```
61
+ ![ Make Request Handler command] ( /../images/make-request-handler.png )
62
+
63
+ ### Make PSR-15 Middleware
64
+
65
+ Generates an instance of Psr\Http\Server\MiddlewareInterface and allocates in its place on the filesystem
66
+ respecting the given full qualified classname
67
+
68
+ ``` bash
69
+ bin/console make:middleware ' App\Application\Http\Middleware\TestMiddleware'
70
+ ```
71
+ ![ Make Middleware command] ( /../images/make-middleware.png )
72
+
73
+ ### Make Invokable Factory
74
+
75
+ Generates an invokable factory and allocates in its place on the filesystem respecting the given full qualified classname
76
+
77
+ ``` bash
78
+ bin/console make:factory ' App\Container\SomeFactory'
79
+ ```
80
+ ![ Make Factory command] ( /../images/make-factory.png )
81
+
82
+ ### Make PSR-14 Compatible Event
83
+
84
+ Generates an instance of Psr\EventDispatcher\StoppableEventInterface and allocates in its place on the filesystem
85
+ respecting the given full qualified classname
86
+
87
+ ``` bash
88
+ bin/console make:event ' App\Domain\Event\SomethingOccurred'
89
+ ```
90
+ ![ Make Event command] ( /../images/make-event.png )
91
+
92
+ ### Make Event Listener
93
+
94
+ Generates an event listener class for given event name, and allocates in its place on the filesystem
95
+ respecting the given full qualified classname
96
+
97
+ ``` bash
98
+ bin/console make:event-listener ' App\Application\Service\SomeEventListener' ' App\Domain\Event\SomethingOccurred'
99
+ ```
100
+ ![ Make Event Listener command] ( /../images/make-event-listener.png )
101
+
102
+ ### Make Symfony Console Command
103
+
104
+ Generates a command class compatible with Symfony console, and allocates in its place on the filesystem
105
+ respecting the given full qualified classname
106
+
107
+ ``` bash
108
+ bin/console make:event-listener ' App\Application\Service\SomeEventListener' ' App\Domain\Event\SomethingOccurred'
109
+ ```
110
+ ![ Make Console Command command] ( /../images/make-console-command.png )
25
111
26
112
## Custom Console Command
27
113
28
- Console tool is built in on top of Symfony Console Component, to createnew command you need to extend from Symfony
114
+ The Console tool, built in on top of Symfony Console Component, to create new command you need to extend from Symfony
29
115
Console Command Class
30
116
31
117
```` php
0 commit comments