@@ -44,18 +44,21 @@ level of verbosity of the ``OutputInterface`` instance:
44
44
| Processing...
45
45
/ Processing...
46
46
- Processing...
47
+ ✔ Finished
47
48
48
49
# OutputInterface::VERBOSITY_VERBOSE (-v)
49
50
\ Processing... (1 sec)
50
51
| Processing... (1 sec)
51
52
/ Processing... (1 sec)
52
53
- Processing... (1 sec)
54
+ ✔ Finished (1 sec)
53
55
54
56
# OutputInterface::VERBOSITY_VERY_VERBOSE (-vv) and OutputInterface::VERBOSITY_DEBUG (-vvv)
55
57
\ Processing... (1 sec, 6.0 MiB)
56
58
| Processing... (1 sec, 6.0 MiB)
57
59
/ Processing... (1 sec, 6.0 MiB)
58
60
- Processing... (1 sec, 6.0 MiB)
61
+ ✔ Finished (1 sec, 6.0 MiB)
59
62
60
63
.. tip ::
61
64
@@ -94,22 +97,23 @@ The progress indicator will now look like this:
94
97
⠛ Processing...
95
98
⠹ Processing...
96
99
⢸ Processing...
100
+ ✔ Finished
97
101
98
- Once the progress indicator is finished, it keeps the latest indicator value by
99
- default. You can replace it with your own::
102
+ Once the progress indicator is finished, it uses the finishedIndicator value (which defaults to ✔). You can replace it with your own::
100
103
101
- $progressIndicator->finish('Finished', '✅');
102
-
103
- Then the progress indicator will render like this:
104
-
105
- .. code-block :: text
104
+ $progressIndicator = new ProgressIndicator($output, 'verbose', 100, null, '🎉');
105
+
106
+ try {
107
+ /* do something */
108
+ $progressIndicator->finish('Finished');
109
+ } catch (\Exception) {
110
+ $progressIndicator->finish('Failed', '🚨');
111
+ }
106
112
107
- ⠏ Processing...
108
- ⠛ Processing...
109
- ✅ Finished
110
113
111
114
.. versionadded :: 7.2
112
115
116
+ The ``finishedIndicator `` parameter for the constructor was introduced in Symfony 7.2.
113
117
The ``finishedIndicator `` parameter for method ``finish() `` was introduced in Symfony 7.2.
114
118
115
119
Customize Placeholders
0 commit comments