Skip to content

Commit 3b21865

Browse files
committed
Template::__toString() is deprecated (BC break)
1 parent 402dea2 commit 3b21865

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Bridges/ApplicationLatte/Template.php

+2
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ public function renderToString(string $file = null, array $params = []): string
6060
/**
6161
* Renders template to string.
6262
* @param can throw exceptions? (hidden parameter)
63+
* @deprecated
6364
*/
6465
public function __toString(): string
6566
{
67+
trigger_error(__METHOD__ . '() is deprecated, renderToString() instead.', E_USER_DEPRECATED);
6668
try {
6769
return $this->latte->renderToString($this->file, $this->getParameters());
6870
} catch (\Throwable $e) {

0 commit comments

Comments
 (0)