larastan: Invalid argument supplied for foreach()
- Larastan Version: 0.6.1
--levelused: 8
Description
phpstan/phpstan-doctrine Version: 0.12.17
phpstan.neon
parameters:
doctrine:
objectManagerLoader: %currentWorkingDirectory%/tests/phpstan-doctrine.php
phpstan-doctrine.php
require __DIR__.'/../vendor/autoload.php';
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
return $app->make(\Doctrine\ORM\EntityManager::class);
Laravel code where the issue was found
phpstan --debug
Invalid argument supplied for foreach() at vendor/nunomaduro/larastan/src/Methods/Passable.php:179
if (! $this->staticAllowed && $staticAllowed === false) {
$statics = $this->resolve('config') === null ? [] : $this->resolve('config')->get('larastan.statics');
foreach ($statics as $staticClass) {
if ($staticClass === $class || $classReflection->isSubclassOf($staticClass)) {
$staticAllowed = true;
break;
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15
@szepeviktor
This is
dump($statics).