When I am trying to upgrade module or theme via Composer, I get this exception.
Fatal error: Cannot redeclare config_get_config_directory() (previously declared in D:\xampp\htdocs\itdlocal_test\web\core\includes\bootstrap.inc:214) in D:\xampp\htdocs\itdlocal_test\web\vendor\drupal\core\includes\bootstrap.inc on line 214
Please let me know on the fix for the error. I have tried removing the lock file and vendor folder but the issue not rectified when we are trying to run composer update.
My composer.json is the following.
{
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "package",
"package": {
"name": "ckeditor/find",
"version": "4.8.0",
"type": "drupal-library",
"extra": {
"installer-name": "find"
},
"dist": {
"url": "https://download.ckeditor.com/find/releases/find_4.8.0.zip",
"type": "zip"
}
}
}
],
"require": {
"composer/installers": "^1.2",
"cweagans/composer-patches": "^1.6",
"drupal/addtoany": "1.16",
"drupal/admin_toolbar": "^2.0",
"drupal/advagg": "^4.1",
"drupal/anchor_link": "^2.4",
"drupal/auto_entitylabel": "^3.0",
"drupal/autologout": "^1.3",
"drupal/better_exposed_filters": "^4.0",
"drupal/blazy": "^2.0",
"drupal/block_class": "2.0",
"drupal/block_token": "1.x-dev",
"drupal/blockgroup": "1.5",
"drupal/blocktabs": "^1.0",
"drupal/chosen": "^2.9",
"drupal/ckeditor_accordion": "^1.2",
"drupal/ckeditor_copyformatting": "^1.0",
"drupal/ckeditor_find": "^1.0@beta",
"drupal/ckeditor_font": "1.3",
"drupal/ckeditor_liststyle": "^1.3",
"drupal/ckeditor_media_embed": "1.11",
"drupal/ckeditor_pastefromword": "^1.0",
"drupal/ckeditor_rm": "^6.0",
"drupal/coder": "^8.3",
"drupal/colorbox": "2.0",
"drupal/colorbox_load": "1.2",
"drupal/colorbutton": "^1.1",
"drupal/config_ignore": "^2.2",
"drupal/config_log": "^2.1",
"drupal/content_export_csv": "^3.0@beta",
"drupal/content_language_access": "^1.1",
"drupal/content_moderation_notifications": "^3.2",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drupal/core-vendor-hardening": "^8.8",
"drupal/crop": "^2.0",
"drupal/csv_importer": "^1.6",
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"drupal/core-vendor-hardening": false
}
},
"enable-patching": true,
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "./"
}
},
"patches": {
"drupal/core": {
"Drupal core patch for enabling exposed filter": "https://www.drupal.org/files/issues/2019-09-30/2681947-33.patch",
"Allow exposed form to preserve URL query parameters": "https://www.drupal.org/files/issues/2020-02-04/2681953-23.patch"
},
"drupal/blocktabs": {
"Views Ajax not working in block tabs": "https://www.drupal.org/files/issues/2019-10-24/blocktabs-preview-2992052-2.patch"
},
"drupal/videojs": {
"In videojs changed the js files in librariesyml": "patches/videojs_library.patch"
},
"drupal/admin_toolbar": {
"'admin_toolbar - Multi column": "patches/added-multi-column-menu-dropdown-2917168-20.patch"
},
"drupal/better_exposed_filters": {
"preserve URL query parameters for bef": "patches/preserv_query_param.patch"
},
"drupal/SMTP": {
"Invalid mail address" : "patches/SMTP_mail.patch"
},
"drupal/token_for_file_name_without_extension": {
"Token for displaying Filename excluding the file extension":"patch_for_tokens_filename_without_extension.patch"
},
"drupal/chosen_dropdown_expand_dropdown_on_spacebar_press": {
"Expanding the chosen dropdown on click of spacebar":"do_not_autosubmit_chosenjs_search.patch"
}
},
"installer-paths": {
"core": ["type:drupal-core"],
"libraries/{$name}": ["type:drupal-library"],
"modules/contrib/{$name}": ["type:drupal-module"],
"profiles/contrib/{$name}": ["type:drupal-profile"],
"themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
"modules/custom/{$name}": ["type:drupal-custom-module"],
"themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"drupal-core-project-message": {
"include-keys": ["homepage", "support"],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/legacy-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}