Skip to content

Commit 01e9e5f

Browse files
committed
Fix #277: Add missing Reference::to() to yiisoft/view renderers config
1 parent 28d4bce commit 01e9e5f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/guide/views/template-engines.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,12 @@ final class MarkdownRenderer implements TemplateRendererInterface
147147
Register your custom renderer:
148148

149149
```php
150+
use Yiisoft\Container\Reference;
151+
150152
// In configuration
151153
'yiisoft/view' => [
152154
'renderers' => [
153-
'md' => App\View\MarkdownRenderer::class,
155+
'md' => Reference::to(App\View\MarkdownRenderer::class),
154156
],
155157
],
156158
```
@@ -163,7 +165,7 @@ Now you can use `.md` template files:
163165

164166
Welcome, {{username}}!
165167

166-
This is a markdown template with **bold** and *italic* text.
168+
This is a Markdown template with **bold** and *italic* text.
167169

168170
- Feature 1
169171
- Feature 2

0 commit comments

Comments
 (0)