Skip to content

Commit 9d2fd8e

Browse files
oliverkleeJakeQZ
andauthored
[TASK] Mark OutputFormat as not extendable (#1131)
Also mark the constructor as `@internal`. Co-authored-by: JakeQZ <[email protected]>
1 parent 6801d26 commit 9d2fd8e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Please also have a look at our
2121

2222
### Changed
2323

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

3637
### Deprecated
3738

39+
- Deprecate extending `OutputFormat` (#1131)
3840
- Deprecate magic method forwarding from `OutputFormat` to `OutputFormatter`
3941
(#894)
4042
- Deprecate greedy calculation of selector specificity (#1018)

src/OutputFormat.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace Sabberworm\CSS;
66

7+
/**
8+
* Extending this class is deprecated in version 8.8.0; it will be made `final` in version 9.0.0.
9+
*/
710
class OutputFormat
811
{
912
/**
@@ -180,6 +183,9 @@ class OutputFormat
180183
*/
181184
private $indentationLevel = 0;
182185

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

185191
/**

0 commit comments

Comments
 (0)