Closed olekhy closed 1 year ago
I cannot reproduce this with the following constructor signatures:
public function __construct($a, array $list, $b)
public function __construct($a, array $list, string $b = '')
public function __construct(string $a, array $list, string $b)
public function __construct(string $a = '', array $list = [], string $b = '')
Are you able to give me your Dummy class constructor signature?
really simple php view renderer is used, _construct() signature: https://github.com/slimphp/PHP-View/blob/3.x/src/PhpRenderer.php#L31
DIC config
<?php
use Slim\Views\PhpRenderer;
return [
'*' => [
'substitutions' => [
PhpRenderer::class => '$DefaultViewRenderer',
],
],
'$DefaultViewRenderer' => [
'shared' => true,
'instanceOf' => PhpRenderer::class,
'constructParams' => [
'/tmp',
[
'varA' => 'A',
'helpers' => ['helperA'],
],
'layout.phtml',
],
],
];
also php version:
$ php -v
PHP 7.4.30 (cli) (built: Sep 13 2022 11:08:45) ( NTS )
This is now fixed in a new release: https://github.com/moddengine/Dice/releases/tag/v4.1.6
@cseufert thx
@cseufert after i made composer update and get latest v4.1.5 on my PC, then i get error:
Argument 2 passed to Dummy::__construct() must be of the type array, string given
my configone line from trace
#0 [internal function]: Dummy->__construct('bar', 'foo', Array, '')
maybe u can fix this?
thx in advance
also commented here https://github.com/moddengine/Dice/commit/d6f16f4b4906007d5651468348482463a4397a40#diff-4a90bf98a876e67fa27cd2179554a48c237b9845d26937e07d967de3e3328dc8R434