Skip to content

[TASK] Drop magic method forwarding in OutputFormat #898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Please also have a look at our

### Removed

- Drop magic method forwarding in `OutputFormat` (#898)
- Drop `atRuleArgs()` from the `AtRule` interface (#1141)
- Remove `OutputFormat::get()` and `::set()` (#1108, #1110)
- Drop special support for vendor prefixes (#1083)
Expand Down
18 changes: 0 additions & 18 deletions src/OutputFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,24 +180,6 @@ final class OutputFormat
*/
private $indentationLevel = 0;

/**
* @param non-empty-string $methodName
* @param array<array-key, mixed> $arguments
*
* @return mixed
*
* @throws \Exception
*/
public function __call(string $methodName, array $arguments)
{
if (\method_exists(OutputFormatter::class, $methodName)) {
// @deprecated since 8.8.0, will be removed in 9.0.0. Call the method on the formatter directly instead.
return \call_user_func_array([$this->getFormatter(), $methodName], $arguments);
} else {
throw new \Exception('Unknown OutputFormat method called: ' . $methodName);
}
}

/**
* @internal
*/
Expand Down