edalzell / statamic-forma

Give your Statamic addons a beautiful CP configuration page
MIT License
8 stars 4 forks source link

TypeError when installing. #4

Closed jeremydouglas closed 3 years ago

jeremydouglas commented 3 years ago

I'm installing your Akismet add-on, but I think it's forma that's tripping up. When I run: composer require silentz/akismet, I receive this error:

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   TypeError 

  Return value of Edalzell\Forma\FormaAddon::getAddon() must be an instance of Statamic\Extend\Addon, null returned

  at vendor/edalzell/forma/src/FormaAddon.php:42
    38|     }
    39| 
    40|     private function getAddon(): Addon
    41|     {
  > 42|         return Blink::once($this->addon, fn () => AddonAPI::get($this->addon));
    43|     }
    44| 
    45|     private function registerRoutes()
    46|     {

      +24 vendor frames 
  25  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

screenshot

jeremydouglas commented 3 years ago

I can confirm that this causes Akismet to fail to install for me on two different apps :(

edalzell commented 3 years ago

I pushed an update to Forma, can you please try again @jeremydouglas?

jeremydouglas commented 3 years ago

That did it, thank you!