PHP Fatal Error Facade Container

Hello to everyone,
I was managing my server and after a composer update I receive this message:

PHP Fatal error: Uncaught TypeError: Argument 1 passed to UserFrosting\System\Facade::setFacadeContainer() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /home/arteller/www/userfrosting/app/system/UserFrosting.php on line 53 and defined in /home/arteller/www/userfrosting/app/system/Facade.php:210

After this I receive only 500 Internal Error from my server.
Anyone can help?

Check this message in the chat:
https://chat.userfrosting.com/channel/support?msg=sbHuEvDFDSRd65hs8

You need to update to UserFrosting 4.3.3 or later, and run composer update again. This issue was introduced by Slim, which introduced a breaking change recently.

I’m running UserFrosting 4.4.1 and getting the same error. Already ran composer update. Anything obvious I still need to do to avoid this error?

Controller::__construct() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /var/www/html/UserFrosting/app/vendor/slim/slim/Slim/CallableResolver.php on line 102

Same here, at the end I downloaded the latest version and rebuild everything. Probably in our sprinkles there are some references about old structure and they cause a conflict.
The error is only that one or there is something else?

1 Like

I’ve got other Slim errors in other spots of the program too … all seem to be about “ContainerInterface”.

Argument 1 passed to UserFrosting\Sprinkle\UfSprinkleBfaWorkitems\Database\Importers\BFLinearProcessDiagram::__construct() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /var/www/html/UserFrosting/app/sprinkles/uf-sprinkle-bigfathom/src/Controller/PageController.php on line 90

And

Argument 1 passed to UserFrosting\Sprinkle\UfSprinkleBfaWorkitems\Controller\BfaMissionController::__construct() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /var/www/html/UserFrosting/app/vendor/slim/slim/Slim/CallableResolver.php on line 102

Resolved by replacing this …

use Interop\Container\ContainerInterface

with these …

use Psr\Container\ContainerInterface;
use Psr\Container\ContainerExceptionInterface as ContainerException;

1 Like