Skip to content
Permalink
Browse files

Template::__toString() is deprecated (BC break)

  • Loading branch information
dg committed Mar 23, 2020
1 parent ce69f1b commit e688bb81d14840ba6c330f9912e0a648c800932a
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/Bridges/ApplicationLatte/Template.php
@@ -58,9 +58,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) {

0 comments on commit e688bb8

Please sign in to comment.
You can’t perform that action at this time.