Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4bae9aa

Browse filesBrowse files
committed
[Console] remove remaining deprecated features
1 parent 6da6853 commit 4bae9aa
Copy full SHA for 4bae9aa

File tree

3 files changed

+2
-18
lines changed
Filter options

3 files changed

+2
-18
lines changed

‎src/Symfony/Component/Console/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
4.0.0
55
-----
66

7+
* `OutputFormatter` throws an exception when unknown options are used
78
* removed `QuestionHelper::setInputStream()/getInputStream()`
89
* removed `Application::getTerminalWidth()/getTerminalHeight()` and
910
`Application::setTerminalDimensions()/getTerminalDimensions()`

‎src/Symfony/Component/Console/Formatter/OutputFormatter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Formatter/OutputFormatter.php
+1-7Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,7 @@ private function createStyleFromString($string)
211211
preg_match_all('([^,;]+)', $match[1], $options);
212212
$options = array_shift($options);
213213
foreach ($options as $option) {
214-
try {
215-
$style->setOption($option);
216-
} catch (\InvalidArgumentException $e) {
217-
@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);
218-
219-
return false;
220-
}
214+
$style->setOption($option);
221215
}
222216
} else {
223217
return false;

‎src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
-11Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,6 @@ public function provideInlineStyleOptionsCases()
193193
);
194194
}
195195

196-
/**
197-
* @group legacy
198-
* @dataProvider provideInlineStyleTagsWithUnknownOptions
199-
* @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)".
200-
*/
201-
public function testInlineStyleOptionsUnknownAreDeprecated($tag, $option)
202-
{
203-
$formatter = new OutputFormatter(true);
204-
$formatter->format($tag);
205-
}
206-
207196
public function provideInlineStyleTagsWithUnknownOptions()
208197
{
209198
return array(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.