minor #28834 Allow integers as default console option value (curry684)
This PR was squashed before being merged into the 2.8 branch (closes #28834).
Discussion
----------
Allow integers as default console option value
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
B/C break fix for static analysis tools.
Ref https://github.com/symfony/symfony/pull/28374#issuecomment-429319088
Commits
-------
064950a03f
Allow integers as default console option value
This commit is contained in:
commit
156b412f7a
@ -37,7 +37,7 @@ class InputOption
|
|||||||
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
||||||
* @param int|null $mode The option mode: One of the VALUE_* constants
|
* @param int|null $mode The option mode: One of the VALUE_* constants
|
||||||
* @param string $description A description text
|
* @param string $description A description text
|
||||||
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
|
* @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE)
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
||||||
*/
|
*/
|
||||||
@ -149,7 +149,7 @@ class InputOption
|
|||||||
/**
|
/**
|
||||||
* Sets the default value.
|
* Sets the default value.
|
||||||
*
|
*
|
||||||
* @param string|string[]|bool|null $default The default value
|
* @param string|string[]|int|bool|null $default The default value
|
||||||
*
|
*
|
||||||
* @throws LogicException When incorrect default value is given
|
* @throws LogicException When incorrect default value is given
|
||||||
*/
|
*/
|
||||||
@ -173,7 +173,7 @@ class InputOption
|
|||||||
/**
|
/**
|
||||||
* Returns the default value.
|
* Returns the default value.
|
||||||
*
|
*
|
||||||
* @return string|string[]|bool|null The default value
|
* @return string|string[]|int|bool|null The default value
|
||||||
*/
|
*/
|
||||||
public function getDefault()
|
public function getDefault()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user