laravel-ignition: "Spatie\ErrorSolutions\SolutionProviderRepository" not found on 2.8.0

Hi guys! I tried to upgrade Ignition from 2.7.0 to 2.8.0 on my Laravel/Filament app but an error occurs. If I downgrade it to 2.7.0, it works again.

  • PHP version : 8.3
  • Laravel 10.48.14
  • Filament 3.2.92

The error is in in C:\Herd\admin.nanou\vendor\spatie\laravel-ignition\src\IgnitionServiceProvider.php (line 140)

$ignitionConfig = (new IgnitionConfig())
    ->merge(config('ignition', []))
    ->loadConfigFile();
$solutionProviders = $this->getSolutionProviders();
- $solutionProviderRepository = new SolutionProviderRepository($solutionProviders);
$this->app->singleton(IgnitionConfig::class, fn () => $ignitionConfig);
$this->app->singleton(SolutionProviderRepositoryContract::class, fn () => $solutionProviderRepository);
⌨️ composer.json
"require": {
        "php": "^8.3",
        "aymanalhattami/filament-context-menu": "^1.0.2",
        "barryvdh/laravel-dompdf": "^2.2.0",
        "codezero/laravel-unique-translation": "^4.3.1",
        "endroid/qr-code": "^5.0.9",
        "fedeisas/laravel-mail-css-inliner": "^5.3.0",
        "filament/filament": "^3.2.92",
        "filament/forms": "^3.2.92",
        "filament/notifications": "^3.2.92",
        "filament/spatie-laravel-translatable-plugin": "^3.2.92",
        "gamez/typed-collection": "^6.1",
        "khanamiryan/qrcode-detector-decoder": "^2.0.2",
        "larabug/larabug": "^3.1",
        "laravel-notification-channels/telegram": "^5.0",
        "laravel/framework": "^10.48.14",
        "laravel/sanctum": "^3.3.3",
        "laravel/tinker": "^2.9.0",
        "livewire/livewire": "^3.5.1",
        "ramsey/uuid": "^4.7.6",
        "setasign/fpdf": "^1.8.6",
        "setasign/fpdi": "^2.6",
        "spatie/image": "^3.6.4",
        "spatie/laravel-permission": "^5.11.1",
        "spatie/laravel-translatable": "^6.7.1",
        "webbingbrasil/filament-copyactions": "^3.0.1"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.13.5",
        "doctrine/dbal": "^3.8.6",
        "driftingly/rector-laravel": "^0.20.0",
        "fakerphp/faker": "^1.23.1",
        "filament/upgrade": "3.0-stable",
        "larastan/larastan": "^2.9.7",
        "laravel/pint": "^1.16.1",
        "laravel/telescope": "^4.17.6",
        "mockery/mockery": "^1.6.12",
        "nunomaduro/collision": "^7.10.0",
        "nunomaduro/phpinsights": "^2.11",
        "pestphp/pest": "^2.34.8",
        "pestphp/pest-plugin-laravel": "^2.4",
        "pestphp/pest-plugin-livewire": "^2.1",
        "pestphp/pest-plugin-type-coverage": "^2.8.3",
        "pestphp/pest-plugin-watch": "^2.1",
        "phpunit/phpunit": "^10.5.17",
        "rector/rector": "^0.15.25",
        "spatie/laravel-ignition": "2.7.0"
    }
📷 Error screenshot

image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17 (2 by maintainers)

Most upvoted comments

I tried to composer update again today and now it works.

For anyone still experiencing this issue, I recommend these steps :

  1. Restart/reboot your server (or local development environment)
  2. composer clear-cache
  3. composer dump-autoload
  4. php artisan optimize:clear

And depending on your project :

  1. php artisan telescope:clear
  2. php artisan horizon:clear

I did an - php artisan optimize:clear - solved my problem. Laravel 10.39

was getting same error on php artisan optimize:clear, i did

  1. rm -rf vendor
  2. composer install error got solved

I cannot reproduce this problem: SolutionProviderRepository is found when I try to use this.

The Spatie\ErrorSolutions\SolutionProviderRepository is part of the spatie/error-solutions package (which is required through spatie/ignition).

Any hints on how to recreate the problem locally are most welcome. Feel free to share a Laravel app to demonstrate the problem.

I couldn’t even re-create it with the same commit. Pushed to staging it worked fine, pushed to production the error occurred. As per Aroutinr further up, it seems to be file system related as a server reboot (‘have you tried turning it off and on again’ almost always works) sorted the issue out, and the action that was causing an error to be thrown (and then fail to be handled properly) in the first place was file uploads. Not sure if any of that is useful…