@@ -44,18 +44,21 @@ level of verbosity of the ``OutputInterface`` instance:
4444 | Processing...
4545 / Processing...
4646 - Processing...
47+ ✔ Finished
4748
4849 # OutputInterface::VERBOSITY_VERBOSE (-v)
4950 \ Processing... (1 sec)
5051 | Processing... (1 sec)
5152 / Processing... (1 sec)
5253 - Processing... (1 sec)
54+ ✔ Finished (1 sec)
5355
5456 # OutputInterface::VERBOSITY_VERY_VERBOSE (-vv) and OutputInterface::VERBOSITY_DEBUG (-vvv)
5557 \ Processing... (1 sec, 6.0 MiB)
5658 | Processing... (1 sec, 6.0 MiB)
5759 / Processing... (1 sec, 6.0 MiB)
5860 - Processing... (1 sec, 6.0 MiB)
61+ ✔ Finished (1 sec, 6.0 MiB)
5962
6063 .. tip ::
6164
@@ -94,22 +97,23 @@ The progress indicator will now look like this:
9497 ⠛ Processing...
9598 ⠹ Processing...
9699 ⢸ Processing...
100+ ✔ Finished
97101
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::
100103
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+ }
106112
107- ⠏ Processing...
108- ⠛ Processing...
109- ✅ Finished
110113
111114.. versionadded :: 7.2
112115
116+ The ``finishedIndicator `` parameter for the constructor was introduced in Symfony 7.2.
113117 The ``finishedIndicator `` parameter for method ``finish() `` was introduced in Symfony 7.2.
114118
115119Customize Placeholders
0 commit comments