Skip to content

Commit a3b59bf

Browse files
committed
[TASK] Mark the OutputFormat as not extendable
This is the V8.x backport of #1131.
1 parent efad65a commit a3b59bf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

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

1212
### Changed
1313

14+
- Mark the `OutputFormat` the constructor as `@internal` (#1133)
1415
- Mark `OutputFormatter` as `@internal` (#896)
1516
- Mark `Selector::isValid()` as `@internal` (#1037)
1617
- Mark parsing-related methods of most CSS elements as `@internal` (#908)
@@ -19,6 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1920

2021
### Deprecated
2122

23+
- Deprecate extending `OutputFormat` (#1133)
2224
- Deprecate `OutputFormat::get()` and `::set()` (#1107)
2325
- Deprecate support for `-webkit-calc` and `-moz-calc` (#1086)
2426
- Deprecate `__toString()` (#1006)

src/OutputFormat.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Sabberworm\CSS;
44

55
/**
6-
* Class OutputFormat
6+
* Extending this class is deprecated in version 8.8.0; it will be made `final` in version 9.0.0.
77
*
88
* @method OutputFormat setSemicolonAfterLastRule(bool $bSemicolonAfterLastRule) Set whether semicolons are added after
99
* last rule.
@@ -239,6 +239,9 @@ class OutputFormat
239239
*/
240240
private $iIndentationLevel = 0;
241241

242+
/**
243+
* @internal since V8.8.0. Use the factory methods `create()`, `createCompact()`, or `createPretty()` instead.
244+
*/
242245
public function __construct()
243246
{
244247
}

0 commit comments

Comments
 (0)