Skip to content

Commit

Permalink
Template::__toString() is deprecated (BC break)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 14, 2020
1 parent 1792024 commit 8827ae2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Bridges/ApplicationLatte/Template.php
Expand Up @@ -60,9 +60,11 @@ public function renderToString(string $file = null, array $params = []): string
/**
* Renders template to string.
* @param can throw exceptions? (hidden parameter)
* @deprecated
*/
public function __toString(): string
{
trigger_error(__METHOD__ . '() is deprecated, renderToString() instead.', E_USER_DEPRECATED);
try {
return $this->latte->renderToString($this->file, $this->getParameters());
} catch (\Throwable $e) {
Expand Down

0 comments on commit 8827ae2

Please sign in to comment.