Skip to content

Commit

Permalink
feature #22906 [Console] remove remaining deprecated features (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Console] remove remaining deprecated features

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

4bae9aa [Console] remove remaining deprecated features
  • Loading branch information
fabpot committed May 25, 2017
2 parents d741908 + 4bae9aa commit 7263d77
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Component/Console/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
4.0.0
-----

* `OutputFormatter` throws an exception when unknown options are used
* removed `QuestionHelper::setInputStream()/getInputStream()`
* removed `Application::getTerminalWidth()/getTerminalHeight()` and
`Application::setTerminalDimensions()/getTerminalDimensions()`
Expand Down
8 changes: 1 addition & 7 deletions src/Symfony/Component/Console/Formatter/OutputFormatter.php
Expand Up @@ -211,13 +211,7 @@ private function createStyleFromString($string)
preg_match_all('([^,;]+)', $match[1], $options);
$options = array_shift($options);
foreach ($options as $option) {
try {
$style->setOption($option);
} catch (\InvalidArgumentException $e) {
@trigger_error(sprintf('Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "%s".', $e->getMessage()), E_USER_DEPRECATED);

return false;
}
$style->setOption($option);
}
} else {
return false;
Expand Down
Expand Up @@ -193,17 +193,6 @@ public function provideInlineStyleOptionsCases()
);
}

/**
* @group legacy
* @dataProvider provideInlineStyleTagsWithUnknownOptions
* @expectedDeprecation Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "Invalid option specified: "%s". Expected one of (bold, underscore, blink, reverse, conceal)".
*/
public function testInlineStyleOptionsUnknownAreDeprecated($tag, $option)
{
$formatter = new OutputFormatter(true);
$formatter->format($tag);
}

public function provideInlineStyleTagsWithUnknownOptions()
{
return array(
Expand Down

0 comments on commit 7263d77

Please sign in to comment.