Date Published: August 1, 2022
Cannot redeclare drupal_get_filename due to Composer plugin authorization prompts
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.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.