diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c22bdd..c96b155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Updated [Rcrowe/TwigBridge](https://github.com/rcrowe/TwigBridge) Dependency from version 0.14.1 to 0.14.3 - Relaxed GraphQL handling of fieldtypes during schema generation. Now errors will be logged but schemas can still be built - Default url for ExpressionEngine Control Panel is now `admin` instead of `admin.php`. This can be changed in `config/coilpack.php`. +- TemplateOutput now implements the [Stringable](https://www.php.net/manual/en/class.stringable.php) interface ## [1.4.2] - 2024-09-26 diff --git a/src/TemplateOutput.php b/src/TemplateOutput.php index e7c0639..69f50b3 100644 --- a/src/TemplateOutput.php +++ b/src/TemplateOutput.php @@ -4,7 +4,7 @@ use Illuminate\Contracts\Support\Arrayable; -class TemplateOutput implements \ArrayAccess, \Countable, \IteratorAggregate +class TemplateOutput implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable { protected $array = []; @@ -136,7 +136,7 @@ public function offsetUnset($offset): void unset($this->array[$offset]); } - public function __toString() + public function __toString(): string { if (empty($this->string) && count($this->array) === 1 && is_string(current($this->array))) { return current($this->array);