Skip to content

Commit 9d2ff81

Browse files
committed
[TASK] Remove __toString()
Closes #998
1 parent f9609c4 commit 9d2ff81

24 files changed

+1
-211
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Please also have a look at our
4848

4949
### Removed
5050

51+
- Remove `__toString()` (#1046)
5152
- Drop magic method forwarding in `OutputFormat` (#898)
5253
- Drop `atRuleArgs()` from the `AtRule` interface (#1141)
5354
- Remove `OutputFormat::get()` and `::set()` (#1108, #1110)

src/CSSList/AtRuleBlockList.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ public function atRuleArgs(): string
4646
return $this->arguments;
4747
}
4848

49-
/**
50-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
51-
*/
52-
public function __toString(): string
53-
{
54-
return $this->render(new OutputFormat());
55-
}
56-
5749
public function render(OutputFormat $outputFormat): string
5850
{
5951
$formatter = $outputFormat->getFormatter();

src/CSSList/CSSList.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,6 @@ public function removeDeclarationBlockBySelector($selectors, $removeAll = false)
400400
}
401401
}
402402

403-
/**
404-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
405-
*/
406-
public function __toString(): string
407-
{
408-
return $this->render(new OutputFormat());
409-
}
410-
411403
protected function renderListContents(OutputFormat $outputFormat): string
412404
{
413405
$result = '';

src/CSSList/KeyFrame.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ public function getAnimationName(): string
5151
return $this->animationName;
5252
}
5353

54-
/**
55-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
56-
*/
57-
public function __toString(): string
58-
{
59-
return $this->render(new OutputFormat());
60-
}
61-
6254
public function render(OutputFormat $outputFormat): string
6355
{
6456
$formatter = $outputFormat->getFormatter();

src/Comment/Comment.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ public function setComment(string $commentText): void
5050
$this->commentText = $commentText;
5151
}
5252

53-
/**
54-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
55-
*/
56-
public function __toString(): string
57-
{
58-
return $this->render(new OutputFormat());
59-
}
60-
6153
public function render(OutputFormat $outputFormat): string
6254
{
6355
return '/*' . $this->commentText . '*/';

src/Property/CSSNamespace.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ public function getLineNo(): int
5454
return $this->lineNumber;
5555
}
5656

57-
/**
58-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
59-
*/
60-
public function __toString(): string
61-
{
62-
return $this->render(new OutputFormat());
63-
}
64-
6557
public function render(OutputFormat $outputFormat): string
6658
{
6759
return '@namespace ' . ($this->prefix === null ? '' : $this->prefix . ' ')

src/Property/Charset.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ public function getCharset(): string
6868
return $this->charset->getString();
6969
}
7070

71-
/**
72-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
73-
*/
74-
public function __toString(): string
75-
{
76-
return $this->render(new OutputFormat());
77-
}
78-
7971
public function render(OutputFormat $outputFormat): string
8072
{
8173
return "{$outputFormat->getFormatter()->comments($this)}@charset {$this->charset->render($outputFormat)};";

src/Property/Import.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ public function getLocation(): URL
6565
return $this->location;
6666
}
6767

68-
/**
69-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
70-
*/
71-
public function __toString(): string
72-
{
73-
return $this->render(new OutputFormat());
74-
}
75-
7668
public function render(OutputFormat $outputFormat): string
7769
{
7870
return $outputFormat->getFormatter()->comments($this) . '@import ' . $this->location->render($outputFormat)

src/Property/Selector.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ public function setSelector(string $selector): void
6262
$this->selector = \trim($selector);
6363
}
6464

65-
/**
66-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
67-
*/
68-
public function __toString(): string
69-
{
70-
return $this->getSelector();
71-
}
72-
7365
/**
7466
* @return int<0, max>
7567
*/

src/Renderable.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,5 @@
66

77
interface Renderable
88
{
9-
/**
10-
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
11-
*/
12-
public function __toString(): string;
13-
149
public function render(OutputFormat $outputFormat): string;
1510
}

0 commit comments

Comments
 (0)