Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] remove remaining deprecated features #22906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Symfony/Component/Console/CHANGELOG.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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