Cannot redeclare drupal_get_filename due to Composer plugin authorization prompts
Date Published: August 1, 2022
Issue
Successfully upgraded the Drupal version to the latest version but after running command "drush updb" getting error like:
$drush updb
PHP Fatal error: Cannot redeclare drupal_get_filename() (previously declared in /var/www/html/xxxxx/vendor/drupal/core/includes/bootstrap.inc:189) in /var/www/html/xxxxx/docroot/core/includes/bootstrap.inc on line 164
[warning] Drush command terminated abnormally.
Resolution
If you answer "no" to Composer plugin authorization prompts, important plugins like composer/installers do not execute, which can lead to an instance of Drupal installed into the vendor directory and it will cause the error. To resolve the issue answer "Yes" to Composer plugin authorization prompts.
Cannot redeclare drupal_get_filename due to Composer plugin authorization prompts | Acquia Product Documentation
Cloud Platform
Cannot redeclare drupal_get_filename due to Composer plugin authorization prompts