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

Skip to content

Commit 7263d77

Browse files
committed
feature #22906 [Console] remove remaining deprecated features (xabbuh)
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
2 parents d741908 + 4bae9aa commit 7263d77

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

src/Symfony/Component/Console/CHANGELOG.md

Lines 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

Lines 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

Lines 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)