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

Commit b19ec47

Browse files
committed
Change config option 'default_suffix' to 'extension' to match other renderers
1 parent eb71018 commit b19ec47

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/ConfigProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* @see https://github.com/zendframework/zend-expressive-zendviewrenderer for the canonical source repository
4-
* @copyright Copyright (c) 2017 Zend Technologies USA Inc. (https://www.zend.com)
4+
* @copyright Copyright (c) 2017-2019 Zend Technologies USA Inc. (https://www.zend.com)
55
* @license https://github.com/zendframework/zend-expressive-zendviewrenderer/blob/master/LICENSE.md New BSD License
66
*/
77

@@ -38,7 +38,7 @@ public function getDependencies() : array
3838
public function getTemplates() : array
3939
{
4040
return [
41-
'default_suffix' => 'phtml',
41+
'extension' => 'phtml',
4242
'layout' => 'layout::default',
4343
'paths' => [],
4444
];

src/ZendViewRendererFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public function __invoke(ContainerInterface $container) : ZendViewRenderer
6969

7070
$nsPathResolver = new NamespacedPathStackResolver();
7171
// Set default suffix
72-
if (isset($config['default_suffix'])) {
73-
$nsPathResolver->setDefaultSuffix($config['default_suffix']);
72+
if (isset($config['extension'])) {
73+
$nsPathResolver->setDefaultSuffix($config['extension']);
7474
}
7575
$resolver->attach(
7676
$nsPathResolver,

test/ZendViewRendererFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* @see https://github.com/zendframework/zend-expressive-zendviewrenderer for the canonical source repository
4-
* @copyright Copyright (c) 2015-2017 Zend Technologies USA Inc. (https://www.zend.com)
4+
* @copyright Copyright (c) 2015-2019 Zend Technologies USA Inc. (https://www.zend.com)
55
* @license https://github.com/zendframework/zend-expressive-zendviewrenderer/blob/master/LICENSE.md New BSD License
66
*/
77

@@ -256,7 +256,7 @@ public function testConfiguresCustomDefaultSuffix()
256256
{
257257
$config = [
258258
'templates' => [
259-
'default_suffix' => 'php',
259+
'extension' => 'php',
260260
],
261261
];
262262

0 commit comments

Comments
 (0)