[Console] remove remaining deprecated features
This commit is contained in:
parent
6da68536f0
commit
4bae9aa3da
@ -4,6 +4,7 @@ CHANGELOG
|
|||||||
4.0.0
|
4.0.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
* `OutputFormatter` throws an exception when unknown options are used
|
||||||
* removed `QuestionHelper::setInputStream()/getInputStream()`
|
* removed `QuestionHelper::setInputStream()/getInputStream()`
|
||||||
* removed `Application::getTerminalWidth()/getTerminalHeight()` and
|
* removed `Application::getTerminalWidth()/getTerminalHeight()` and
|
||||||
`Application::setTerminalDimensions()/getTerminalDimensions()`
|
`Application::setTerminalDimensions()/getTerminalDimensions()`
|
||||||
|
@ -211,13 +211,7 @@ class OutputFormatter implements OutputFormatterInterface
|
|||||||
preg_match_all('([^,;]+)', $match[1], $options);
|
preg_match_all('([^,;]+)', $match[1], $options);
|
||||||
$options = array_shift($options);
|
$options = array_shift($options);
|
||||||
foreach ($options as $option) {
|
foreach ($options as $option) {
|
||||||
try {
|
$style->setOption($option);
|
||||||
$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 {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -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()
|
public function provideInlineStyleTagsWithUnknownOptions()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
Reference in New Issue
Block a user