efabrica-team / phpstan-latte

PHPStan extension to check compiled latte templates
MIT License
42 stars 4 forks source link

Unable to resolve template type T in call to method static method Latte\Runtime\Filters::slice() #432

Closed lulco closed 1 year ago

lulco commented 1 year ago
{$someString|slice: 0, 2}
lulco commented 1 year ago

Need more info here, cannot reproduce in https://github.com/efabrica-team/phpstan-latte/pull/434

lulco commented 1 year ago

This error occures if $someString is nullable. With level >= 8 you will get also error Parameter #1 $value of static method Latte\Runtime\Filters::slice() expects array|string, string|null given. but in lower levels you can be lost :)