Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fredemagi's avatar

Deploy error: In PredisConnector.php line. Class 'Predis\Client' not found

As the title indicates, I get an error through deploy on Laravel Forge to Digital Ocean. I have checked the file locally, and Predit/Client is included. What do I do wrong?

0 likes
4 replies
JohnBraun's avatar

Did you include the predis/predis package locally?

If so, do you see it in your composer.json?

Did you commit your composer.json?

Did you composer install on the server?

If all else fails, run this on your server:

composer require predis/predis
fredemagi's avatar

Yes to all. I just tried composer require predis/predis on the server, but same error. The full log is:

Wed Jul 10 14:00:54 UTC 2019
Application is now in maintenance mode.
From github.com:USER/REPO
 * branch            master     -> FETCH_HEAD
Already up to date.
Loading composer repositories with package information
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.

In PredisConnector.php line 25:
                                   
  Class 'Predis\Client' not found  
                                   
JohnBraun's avatar

I almost dont dare to ask, but did you try

composer dump-autoload yet? (On the server)

fredemagi's avatar

I did without success.

Solution: I started all over with deployment and a fresh upload to github.

Please or to participate in this conversation.