This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Console
Fabien Potencier b9cc0890c4 feature #22317 [Console] Make SymfonyQuestionHelper::ask optional by default (ro0NL)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Console] Make SymfonyQuestionHelper::ask optional by default

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes (nothing in core depends on it)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

i noticed when writing commands i always keep doing

```php
$io = new SymfonyStyle($input, $output);
$answer = $io->ask('...', null, function ($value) { return $value; });

// instead of just
$answer = $io->ask('...');
```

only to bypass a built-in validation, of which im not sure why it's there. Note the base question helper doesnt make this assumption...

Commits
-------

2da429cd0a [Console] Make SymfonyQuestionHelper::ask optional by default
2017-07-20 19:25:39 +02:00
..
Command Merge branch '3.4' 2017-07-12 16:12:10 +02:00
CommandLoader Add support for command lazy-loading 2017-07-12 11:59:19 +02:00
DependencyInjection Fix lazy commands registration 2017-07-17 14:21:21 +02:00
Descriptor Merge branch '3.2' into 3.3 2017-07-03 11:12:02 +03:00
Event Remove deprecated console.exception event 2017-05-21 09:38:50 -05:00
EventListener [Console] Review console.ERROR related behavior 2017-04-25 10:16:45 -04:00
Exception [Console] Fix infinite loop on missing input 2016-11-03 09:51:57 +01:00
Formatter [Console] remove remaining deprecated features 2017-05-25 10:45:41 +02:00
Helper feature #22317 [Console] Make SymfonyQuestionHelper::ask optional by default (ro0NL) 2017-07-20 19:25:39 +02:00
Input Merge branch '3.2' into 3.3 2017-06-02 11:51:43 +02:00
Logger Merge branch '3.1' 2016-11-16 17:18:16 -05:00
Output Merge branch '2.8' into 3.2 2017-03-20 10:32:19 +01:00
Question Merge branch '2.8' into 3.2 2017-05-28 07:08:39 -07:00
Resources/bin Move hiddeninput.exe to Resources/bin 2012-10-16 11:08:11 +02:00
Style [Console] simplify the implementation of SymfonyStyle::comment() 2017-02-18 09:59:26 -08:00
Tester Merge branch '2.8' into 3.2 2017-04-04 09:26:27 +02:00
Tests Merge branch '3.4' 2017-07-12 16:12:10 +02:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
Application.php Merge branch '3.4' 2017-07-17 17:37:04 +02:00
CHANGELOG.md feature #22317 [Console] Make SymfonyQuestionHelper::ask optional by default (ro0NL) 2017-07-20 19:25:39 +02:00
composer.json Merge branch '3.4' 2017-06-12 11:12:26 -07:00
ConsoleEvents.php Remove deprecated console.exception event 2017-05-21 09:38:50 -05:00
LICENSE updated LICENSE year 2017-01-02 12:30:00 -08:00
phpunit.xml.dist Merge branch '2.7' into 2.8 2017-04-12 07:07:15 -07:00
README.md Updated all the README files 2016-03-04 08:12:06 +01:00
Terminal.php Allow terminal dimensions to be set to 0 (unbounded) 2017-04-11 16:41:42 +01:00

Console Component

The Console component eases the creation of beautiful and testable command line interfaces.

Resources

Credits

Resources/bin/hiddeninput.exe is a third party binary provided within this component. Find sources and license at https://github.com/Seldaek/hidden-input.