nunomaduro / phpinsights

🔰 Instant PHP quality checks from your console
https://phpinsights.com
MIT License
5.26k stars 279 forks source link

Logic Exception unable to find data within Laravel project #511

Closed longestdrive closed 2 years ago

longestdrive commented 3 years ago
Q A
Bug report? no
Feature request? no
Library version 2.0

HI I'm using php insights for the first time. I've installed the package within my Laravel project and published the config file.

On first run I get this error:

 LogicException 

  Unable to find data for /home/vagrant/code/wedleague/app/Http/Controllers/Admin/RoleController.php

  at vendor/nunomaduro/phpinsights/src/Domain/Runner.php:184
    180â–•     {
    181â–•         $cacheKey = 'insights.' . $this->cacheKey . '.' . md5($file->getContents());
    182â–•         // Do not use cache if fix is enabled to force processors to handle it
    183â–•         if (! $this->cache->has($cacheKey)) {
  ➜ 184▕             throw new \LogicException('Unable to find data for ' . $file->getPathname());
    185â–•         }
    186â–• 
    187â–•         $this->loadDetailsCache($cacheKey);
    188â–• 

      +4 vendor frames 
  5   [internal]:0
      NunoMaduro\PhpInsights\Domain\Insights\InsightCollectionFactory::NunoMaduro\PhpInsights\Domain\Insights\{closure}()

      +17 vendor frames 
  23  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

I'm not sure where to start working out what's gone wrong. The controller exists - what does this error mean?

Sorry for vague question.

Running on a vagrant machine with homestead php7.4 if that's any help.

Any pointers appreciated

Thank you