Skip to content

[TASK] Mark OutputFormat as not extendable #1131

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 4 commits into from
Mar 10, 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Please also have a look at our

### Changed

- Mark the `OutputFormat` constructor as `@internal` (#1131)
- Mark `OutputFormatter` as `@internal` (#896)
- Make `Selector` a `Renderable` (#1017)
- Mark `Selector::isValid()` as `@internal` (#1037)
Expand All @@ -35,6 +36,7 @@ Please also have a look at our

### Deprecated

- Deprecate extending `OutputFormat` (#1131)
- Deprecate magic method forwarding from `OutputFormat` to `OutputFormatter`
(#894)
- Deprecate greedy calculation of selector specificity (#1018)
Expand Down
6 changes: 6 additions & 0 deletions src/OutputFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Sabberworm\CSS;

/**
* Extending this class is deprecated in version 8.8.0; it will be made `final` in version 9.0.0.
*/
class OutputFormat
{
/**
Expand Down Expand Up @@ -180,6 +183,9 @@ class OutputFormat
*/
private $indentationLevel = 0;

/**
* @internal since V8.8.0. Use the factory methods `create()`, `createCompact()`, or `createPretty()` instead.
*/
public function __construct() {}

/**
Expand Down