Skip to content

Commit ec2c007

Browse files
committed
[TASK] Deprecate method forwarding OutputFormat to OutputFormatter
This is the V8.x backport of #894.
1 parent d882635 commit ec2c007

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
4444

4545
### Deprecated
4646

47+
- Deprecate magic method forwarding from `OutputFormat` to `OutputFormatter`
48+
(#894)
4749
- Deprecate the expansion of shorthand properties (#719)
4850
- Deprecate `Parser::setCharset()` and `Parser::getCharset()` (#703)
4951

src/OutputFormat.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ public function __call($sMethodName, array $aArguments)
311311
} elseif (strpos($sMethodName, 'get') === 0) {
312312
return $this->get(substr($sMethodName, 3));
313313
} elseif (method_exists(OutputFormatter::class, $sMethodName)) {
314+
// @deprecated since 8.8.0, will be removed in 9.0.0. Call the method on the formatter directly instead.
314315
return call_user_func_array([$this->getFormatter(), $sMethodName], $aArguments);
315316
} else {
316317
throw new \Exception('Unknown OutputFormat method called: ' . $sMethodName);

0 commit comments

Comments
 (0)