Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 808f10a

Browse files
committed
Use html.twig as default twig extension
- Per @xtreamwayz
1 parent 6768ba5 commit 808f10a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/book/container/factories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ It consumes the following `config` structure:
255255
'cache_dir' => 'path to cached templates',
256256
'assets_url' => 'base URL for assets',
257257
'assets_version' => 'base version for assets',
258-
'extension' => 'file extension used by templates; defaults to html',
258+
'extension' => 'file extension used by templates; defaults to html.twig',
259259
'paths' => [
260260
// namespace / path pairs
261261
//

src/Container/Template/TwigFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* 'cache_dir' => 'path to cached templates',
2929
* 'assets_url' => 'base URL for assets',
3030
* 'assets_version' => 'base version for assets',
31-
* 'extension' => 'file extension used by templates; defaults to html',
31+
* 'extension' => 'file extension used by templates; defaults to html.twig',
3232
* 'paths' => [
3333
* // namespace / path pairs
3434
* //
@@ -74,7 +74,7 @@ public function __invoke(ContainerInterface $container)
7474
}
7575

7676
// Inject environment
77-
$twig = new Twig($environment, isset($config['extension']) ? $config['extension'] : 'html');
77+
$twig = new Twig($environment, isset($config['extension']) ? $config['extension'] : 'html.twig');
7878

7979
// Add template paths
8080
$allPaths = isset($config['paths']) && is_array($config['paths']) ? $config['paths'] : [];

0 commit comments

Comments
 (0)