Slamdunk / phpstan-laminas-framework

Laminas Framework 3 extensions for PHPStan
MIT License
16 stars 10 forks source link

Plugin method should accept string variable as argument #11

Closed neilime closed 4 years ago

neilime commented 4 years ago

Fix error "Internal error: Argument passed to Laminas\View\Renderer\PhpRenderer::plugin should be a string, string given" when ViewModel->plugin is called with a variable containing a string instead of a pure string:

$name = 'form';

// ...

$this->getView()->plugin($name);
Slamdunk commented 4 years ago

Hi, thank you for reporting the issue. Can you add tests to your patch please?

neilime commented 4 years ago

@Slamdunk I have added some tests

Slamdunk commented 4 years ago

Thank you @neilime and @ondrejmirtes