Drupal 9: `cv` fails on CiviCRM 5.48.2
Overview
cv
command fails on CiviCRM 5.48.2 on Drupal 9
Reproduction steps
- run any cv command, such as:
cv ext:list -L
- Got an error
In Drupal.php line 170:
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
Environment information
- CiviCRM: 5.48.2
- PHP: 7.4
- CMS: Drupal 9.3.12
- Database: MariaDB 10.5.12
- cv: v0.3.21 (installed by composer). This is composer.json part:
"require": {
"civicrm/civicrm-core": "~5.46",
"civicrm/civicrm-drupal-8": "~5.46",
"civicrm/civicrm-packages": "~5.46",
"civicrm/cv": "^0.3.16",