[Console] remove remaining deprecated features

This commit is contained in:
Christian Flothmann 2017-05-25 10:45:41 +02:00
parent 6da68536f0
commit 4bae9aa3da
3 changed files with 2 additions and 18 deletions

View File

@ -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()`

View File

@ -211,13 +211,7 @@ class OutputFormatter implements OutputFormatterInterface
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;
}
}
} else {
return false;

View File

@ -193,17 +193,6 @@ class OutputFormatterTest extends TestCase
);
}
/**
* @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(