| 1 |
CHANGELOG |
| 2 |
========= |
| 3 |
|
| 4 |
7.4 |
| 5 |
--- |
| 6 |
|
| 7 |
* Add `Command::getCode()` to get the code set via `setCode()` |
| 8 |
* Allow setting aliases and the hidden flag via the command name passed to the constructor |
| 9 |
* Introduce `Symfony\Component\Console\Application::addCommand()` to simplify using invokable commands when the component is used standalone |
| 10 |
* Deprecate `Symfony\Component\Console\Application::add()` in favor of `Symfony\Component\Console\Application::addCommand()` |
| 11 |
* Add `BackedEnum` support with `#[Argument]` and `#[Option]` inputs in invokable commands |
| 12 |
* Allow Usages to be specified via `#[AsCommand]` attribute. |
| 13 |
* Allow passing invokable commands to `Symfony\Component\Console\Tester\CommandTester` |
| 14 |
* Add `#[MapInput]` attribute to support DTOs in commands |
| 15 |
* Add optional timeout for interaction in `QuestionHelper` |
| 16 |
* Add support for interactive invokable commands with `#[Interact]` and `#[Ask]` attributes |
| 17 |
* Add support for `Cursor` helper in invokable commands |
| 18 |
|
| 19 |
7.3 |
| 20 |
--- |
| 21 |
|
| 22 |
* Add `TreeHelper` and `TreeStyle` to display tree-like structures |
| 23 |
* Add `SymfonyStyle::createTree()` |
| 24 |
* Add support for invokable commands and add `#[Argument]` and `#[Option]` attributes to define input arguments and options |
| 25 |
* Deprecate not declaring the parameter type in callable commands defined through `setCode` method |
| 26 |
* Add support for help definition via `AsCommand` attribute |
| 27 |
* Deprecate methods `Command::getDefaultName()` and `Command::getDefaultDescription()` in favor of the `#[AsCommand]` attribute |
| 28 |
* Add support for Markdown format in `Table` |
| 29 |
* Add support for `LockableTrait` in invokable commands |
| 30 |
* Deprecate returning a non-integer value from a `\Closure` function set via `Command::setCode()` |
| 31 |
* Mark `#[AsCommand]` attribute as `@final` |
| 32 |
* Add support for `SignalableCommandInterface` with invokable commands |
| 33 |
|
| 34 |
7.2 |
| 35 |
--- |
| 36 |
|
| 37 |
* Add support for `FORCE_COLOR` environment variable |
| 38 |
* Add `verbosity` argument to `mustRun` process helper method |
| 39 |
* [BC BREAK] Add silent verbosity (`--silent`/`SHELL_VERBOSITY=-2`) to suppress all output, including errors |
| 40 |
* Add `OutputInterface::isSilent()`, `Output::isSilent()`, `OutputStyle::isSilent()` methods |
| 41 |
* Add a configurable finished indicator to the progress indicator to show that the progress is finished |
| 42 |
* Add ability to schedule alarm signals and a `ConsoleAlarmEvent` |
| 43 |
|
| 44 |
7.1 |
| 45 |
--- |
| 46 |
|
| 47 |
* Add `ArgvInput::getRawTokens()` |
| 48 |
|
| 49 |
7.0 |
| 50 |
--- |
| 51 |
|
| 52 |
* Add method `__toString()` to `InputInterface` |
| 53 |
* Remove `Command::$defaultName` and `Command::$defaultDescription`, use the `AsCommand` attribute instead |
| 54 |
* Require explicit argument when calling `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()` and `Question::setAutocompleterCallback/setValidator()` |
| 55 |
* Remove `StringInput::REGEX_STRING` |
| 56 |
|
| 57 |
6.4 |
| 58 |
--- |
| 59 |
|
| 60 |
* Add `SignalMap` to map signal value to its name |
| 61 |
* Multi-line text in vertical tables is aligned properly |
| 62 |
* The application can also catch errors with `Application::setCatchErrors(true)` |
| 63 |
* Add `RunCommandMessage` and `RunCommandMessageHandler` |
| 64 |
* Dispatch `ConsoleTerminateEvent` after an exit on signal handling and add `ConsoleTerminateEvent::getInterruptingSignal()` |
| 65 |
|
| 66 |
6.3 |
| 67 |
--- |
| 68 |
|
| 69 |
* Add support for choosing exit code while handling signal, or to not exit at all |
| 70 |
* Add `ProgressBar::setPlaceholderFormatter` to set a placeholder attached to a instance, instead of being global. |
| 71 |
* Add `ReStructuredTextDescriptor` |
| 72 |
|
| 73 |
6.2 |
| 74 |
--- |
| 75 |
|
| 76 |
* Improve truecolor terminal detection in some cases |
| 77 |
* Add support for 256 color terminals (conversion from Ansi24 to Ansi8 if terminal is capable of it) |
| 78 |
* Deprecate calling `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()`, `Question::setAutocompleterCallback/setValidator()`without any arguments |
| 79 |
* Change the signature of `OutputFormatterStyleInterface::setForeground/setBackground()` to `setForeground/setBackground(?string)` |
| 80 |
* Change the signature of `HelperInterface::setHelperSet()` to `setHelperSet(?HelperSet)` |
| 81 |
|
| 82 |
6.1 |
| 83 |
--- |
| 84 |
|
| 85 |
* Add support to display table vertically when calling setVertical() |
| 86 |
* Add method `__toString()` to `InputInterface` |
| 87 |
* Added `OutputWrapper` to prevent truncated URL in `SymfonyStyle::createBlock`. |
| 88 |
* Deprecate `Command::$defaultName` and `Command::$defaultDescription`, use the `AsCommand` attribute instead |
| 89 |
* Add suggested values for arguments and options in input definition, for input completion |
| 90 |
* Add `$resumeAt` parameter to `ProgressBar#start()`, so that one can easily 'resume' progress on longer tasks, and still get accurate `getEstimate()` and `getRemaining()` results. |
| 91 |
|
| 92 |
6.0 |
| 93 |
--- |
| 94 |
|
| 95 |
* `Command::setHidden()` has a default value (`true`) for `$hidden` parameter and is final |
| 96 |
* Remove `Helper::strlen()`, use `Helper::width()` instead |
| 97 |
* Remove `Helper::strlenWithoutDecoration()`, use `Helper::removeDecoration()` instead |
| 98 |
* `AddConsoleCommandPass` can not be configured anymore |
| 99 |
* Remove `HelperSet::setCommand()` and `getCommand()` without replacement |
| 100 |
|
| 101 |
5.4 |
| 102 |
--- |
| 103 |
|
| 104 |
* Add `TesterTrait::assertCommandIsSuccessful()` to test command |
| 105 |
* Deprecate `HelperSet::setCommand()` and `getCommand()` without replacement |
| 106 |
|
| 107 |
5.3 |
| 108 |
--- |
| 109 |
|
| 110 |
* Add `GithubActionReporter` to render annotations in a Github Action |
| 111 |
* Add `InputOption::VALUE_NEGATABLE` flag to handle `--foo`/`--no-foo` options |
| 112 |
* Add the `Command::$defaultDescription` static property and the `description` attribute |
| 113 |
on the `console.command` tag to allow the `list` command to instantiate commands lazily |
| 114 |
* Add option `--short` to the `list` command |
| 115 |
* Add support for bright colors |
| 116 |
* Add `#[AsCommand]` attribute for declaring commands on PHP 8 |
| 117 |
* Add `Helper::width()` and `Helper::length()` |
| 118 |
* The `--ansi` and `--no-ansi` options now default to `null`. |
| 119 |
|
| 120 |
5.2.0 |
| 121 |
----- |
| 122 |
|
| 123 |
* Added `SingleCommandApplication::setAutoExit()` to allow testing via `CommandTester` |
| 124 |
* added support for multiline responses to questions through `Question::setMultiline()` |
| 125 |
and `Question::isMultiline()` |
| 126 |
* Added `SignalRegistry` class to stack signals handlers |
| 127 |
* Added support for signals: |
| 128 |
* Added `Application::getSignalRegistry()` and `Application::setSignalsToDispatchEvent()` methods |
| 129 |
* Added `SignalableCommandInterface` interface |
| 130 |
* Added `TableCellStyle` class to customize table cell |
| 131 |
* Removed `php ` prefix invocation from help messages. |
| 132 |
|
| 133 |
5.1.0 |
| 134 |
----- |
| 135 |
|
| 136 |
* `Command::setHidden()` is final since Symfony 5.1 |
| 137 |
* Add `SingleCommandApplication` |
| 138 |
* Add `Cursor` class |
| 139 |
|
| 140 |
5.0.0 |
| 141 |
----- |
| 142 |
|
| 143 |
* removed support for finding hidden commands using an abbreviation, use the full name instead |
| 144 |
* removed `TableStyle::setCrossingChar()` method in favor of `TableStyle::setDefaultCrossingChar()` |
| 145 |
* removed `TableStyle::setHorizontalBorderChar()` method in favor of `TableStyle::setDefaultCrossingChars()` |
| 146 |
* removed `TableStyle::getHorizontalBorderChar()` method in favor of `TableStyle::getBorderChars()` |
| 147 |
* removed `TableStyle::setVerticalBorderChar()` method in favor of `TableStyle::setVerticalBorderChars()` |
| 148 |
* removed `TableStyle::getVerticalBorderChar()` method in favor of `TableStyle::getBorderChars()` |
| 149 |
* removed support for returning `null` from `Command::execute()`, return `0` instead |
| 150 |
* `ProcessHelper::run()` accepts only `array|Symfony\Component\Process\Process` for its `command` argument |
| 151 |
* `Application::setDispatcher` accepts only `Symfony\Contracts\EventDispatcher\EventDispatcherInterface` |
| 152 |
for its `dispatcher` argument |
| 153 |
* renamed `Application::renderException()` and `Application::doRenderException()` |
| 154 |
to `renderThrowable()` and `doRenderThrowable()` respectively. |
| 155 |
|
| 156 |
4.4.0 |
| 157 |
----- |
| 158 |
|
| 159 |
* deprecated finding hidden commands using an abbreviation, use the full name instead |
| 160 |
* added `Question::setTrimmable` default to true to allow the answer to be trimmed |
| 161 |
* added method `minSecondsBetweenRedraws()` and `maxSecondsBetweenRedraws()` on `ProgressBar` |
| 162 |
* `Application` implements `ResetInterface` |
| 163 |
* marked all dispatched event classes as `@final` |
| 164 |
* added support for displaying table horizontally |
| 165 |
* deprecated returning `null` from `Command::execute()`, return `0` instead |
| 166 |
* Deprecated the `Application::renderException()` and `Application::doRenderException()` methods, |
| 167 |
use `renderThrowable()` and `doRenderThrowable()` instead. |
| 168 |
* added support for the `NO_COLOR` env var (https://no-color.org/) |
| 169 |
|
| 170 |
4.3.0 |
| 171 |
----- |
| 172 |
|
| 173 |
* added support for hyperlinks |
| 174 |
* added `ProgressBar::iterate()` method that simplify updating the progress bar when iterating |
| 175 |
* added `Question::setAutocompleterCallback()` to provide a callback function |
| 176 |
that dynamically generates suggestions as the user types |
| 177 |
|
| 178 |
4.2.0 |
| 179 |
----- |
| 180 |
|
| 181 |
* allowed passing commands as `[$process, 'ENV_VAR' => 'value']` to |
| 182 |
`ProcessHelper::run()` to pass environment variables |
| 183 |
* deprecated passing a command as a string to `ProcessHelper::run()`, |
| 184 |
pass it the command as an array of its arguments instead |
| 185 |
* made the `ProcessHelper` class final |
| 186 |
* added `WrappableOutputFormatterInterface::formatAndWrap()` (implemented in `OutputFormatter`) |
| 187 |
* added `capture_stderr_separately` option to `CommandTester::execute()` |
| 188 |
|
| 189 |
4.1.0 |
| 190 |
----- |
| 191 |
|
| 192 |
* added option to run suggested command if command is not found and only 1 alternative is available |
| 193 |
* added option to modify console output and print multiple modifiable sections |
| 194 |
* added support for iterable messages in output `write` and `writeln` methods |
| 195 |
|
| 196 |
4.0.0 |
| 197 |
----- |
| 198 |
|
| 199 |
* `OutputFormatter` throws an exception when unknown options are used |
| 200 |
* removed `QuestionHelper::setInputStream()/getInputStream()` |
| 201 |
* removed `Application::getTerminalWidth()/getTerminalHeight()` and |
| 202 |
`Application::setTerminalDimensions()/getTerminalDimensions()` |
| 203 |
* removed `ConsoleExceptionEvent` |
| 204 |
* removed `ConsoleEvents::EXCEPTION` |
| 205 |
|
| 206 |
3.4.0 |
| 207 |
----- |
| 208 |
|
| 209 |
* added `SHELL_VERBOSITY` env var to control verbosity |
| 210 |
* added `CommandLoaderInterface`, `FactoryCommandLoader` and PSR-11 |
| 211 |
`ContainerCommandLoader` for commands lazy-loading |
| 212 |
* added a case-insensitive command name matching fallback |
| 213 |
* added static `Command::$defaultName/getDefaultName()`, allowing for |
| 214 |
commands to be registered at compile time in the application command loader. |
| 215 |
Setting the `$defaultName` property avoids the need for filling the `command` |
| 216 |
attribute on the `console.command` tag when using `AddConsoleCommandPass`. |
| 217 |
|
| 218 |
3.3.0 |
| 219 |
----- |
| 220 |
|
| 221 |
* added `ExceptionListener` |
| 222 |
* added `AddConsoleCommandPass` (originally in FrameworkBundle) |
| 223 |
* [BC BREAK] `Input::getOption()` no longer returns the default value for options |
| 224 |
with value optional explicitly passed empty |
| 225 |
* added console.error event to catch exceptions thrown by other listeners |
| 226 |
* deprecated console.exception event in favor of console.error |
| 227 |
* added ability to handle `CommandNotFoundException` through the |
| 228 |
`console.error` event |
| 229 |
* deprecated default validation in `SymfonyQuestionHelper::ask` |
| 230 |
|
| 231 |
3.2.0 |
| 232 |
------ |
| 233 |
|
| 234 |
* added `setInputs()` method to CommandTester for ease testing of commands expecting inputs |
| 235 |
* added `setStream()` and `getStream()` methods to Input (implement StreamableInputInterface) |
| 236 |
* added StreamableInputInterface |
| 237 |
* added LockableTrait |
| 238 |
|
| 239 |
3.1.0 |
| 240 |
----- |
| 241 |
|
| 242 |
* added truncate method to FormatterHelper |
| 243 |
* added setColumnWidth(s) method to Table |
| 244 |
|
| 245 |
2.8.3 |
| 246 |
----- |
| 247 |
|
| 248 |
* remove readline support from the question helper as it caused issues |
| 249 |
|
| 250 |
2.8.0 |
| 251 |
----- |
| 252 |
|
| 253 |
* use readline for user input in the question helper when available to allow |
| 254 |
the use of arrow keys |
| 255 |
|
| 256 |
2.6.0 |
| 257 |
----- |
| 258 |
|
| 259 |
* added a Process helper |
| 260 |
* added a DebugFormatter helper |
| 261 |
|
| 262 |
2.5.0 |
| 263 |
----- |
| 264 |
|
| 265 |
* deprecated the dialog helper (use the question helper instead) |
| 266 |
* deprecated TableHelper in favor of Table |
| 267 |
* deprecated ProgressHelper in favor of ProgressBar |
| 268 |
* added ConsoleLogger |
| 269 |
* added a question helper |
| 270 |
* added a way to set the process name of a command |
| 271 |
* added a way to set a default command instead of `ListCommand` |
| 272 |
|
| 273 |
2.4.0 |
| 274 |
----- |
| 275 |
|
| 276 |
* added a way to force terminal dimensions |
| 277 |
* added a convenient method to detect verbosity level |
| 278 |
* [BC BREAK] made descriptors use output instead of returning a string |
| 279 |
|
| 280 |
2.3.0 |
| 281 |
----- |
| 282 |
|
| 283 |
* added multiselect support to the select dialog helper |
| 284 |
* added Table Helper for tabular data rendering |
| 285 |
* added support for events in `Application` |
| 286 |
* added a way to normalize EOLs in `ApplicationTester::getDisplay()` and `CommandTester::getDisplay()` |
| 287 |
* added a way to set the progress bar progress via the `setCurrent` method |
| 288 |
* added support for multiple InputOption shortcuts, written as `'-a|-b|-c'` |
| 289 |
* added two additional verbosity levels, VERBOSITY_VERY_VERBOSE and VERBOSITY_DEBUG |
| 290 |
|
| 291 |
2.2.0 |
| 292 |
----- |
| 293 |
|
| 294 |
* added support for colorization on Windows via ConEmu |
| 295 |
* add a method to Dialog Helper to ask for a question and hide the response |
| 296 |
* added support for interactive selections in console (DialogHelper::select()) |
| 297 |
* added support for autocompletion as you type in Dialog Helper |
| 298 |
|
| 299 |
2.1.0 |
| 300 |
----- |
| 301 |
|
| 302 |
* added ConsoleOutputInterface |
| 303 |
* added the possibility to disable a command (Command::isEnabled()) |
| 304 |
* added suggestions when a command does not exist |
| 305 |
* added a --raw option to the list command |
| 306 |
* added support for STDERR in the console output class (errors are now sent |
| 307 |
to STDERR) |
| 308 |
* made the defaults (helper set, commands, input definition) in Application |
| 309 |
more easily customizable |
| 310 |
* added support for the shell even if readline is not available |
| 311 |
* added support for process isolation in Symfony shell via |
| 312 |
`--process-isolation` switch |
| 313 |
* added support for `--`, which disables options parsing after that point |
| 314 |
(tokens will be parsed as arguments) |