Drush updb broken with Devel 5
Problem/Motivation
After updating from Devel 4.2 to Devel 5.0, drush updb stopped working.
It throws the following error:
TypeError: Cannot assign Drupal\Core\DependencyInjection\ContainerBuilder to property Drupal\devel\Commands\DevelCommands::$container of type Drupal\Core\DependencyInjection\Container in Drupal\devel\Commands\DevelCommands->__construct() (line 49 of /var/www/html/web/modules/contrib/devel/src/Commands/DevelCommands.php) #0 [internal function]: Drupal\devel\Commands\DevelCommands->__construct(Object(Drupal\token\Token), Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher), Object(Drupal\Core\Extension\ModuleHandler))
I'm using Drupal 9.4.6, nginx/1.22.0, PHP 8.1.8, MariaDB 10.3.35, Drush 11.2.0. Let me know if you need further details.
Edited by FiNeX