Skip to content

Commit

Permalink
feat(twig): TwigRenderContext::create will append '.twig' to the file…
Browse files Browse the repository at this point in the history
… name if not present
  • Loading branch information
razshare committed Jan 29, 2024
1 parent d100663 commit 3bf5a1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/Web/TwigRenderContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public static function create(
string $fileName,
array $properties = [],
):self {
if (!str_ends_with($fileName, '.twig')) {
$fileName .= '.twig';
}
return new self($fileName, $properties);
}
private function __construct(
Expand Down

0 comments on commit 3bf5a1d

Please sign in to comment.