A dev site keeps on downloading another Drupal into the vendor folder after running composer update. Of course, I didn't have it in a git repo yet and did this prior to a meeting. The last time I ran composer update on this site was ~2 weeks ago.
Ran composer update today on a dev site and it now thinks that Drupal needs to be installed. I was working on the website and needed to add some modules to the site and that seemed to work fine and ran composer update. I tried to jump to the Extend page and the site redirected to the Install Drupal page /core/install.php.
I attempted to run some commands in Drush which responded with errors so I went verbose!
[devemenc@host web]$ drush -d -v status
Using the Drush script found at /home/devemenc/vendor/drush/drush/drush using pcntl_exec
[preflight] Config paths: /home/devemenc/vendor/drush/drush/drush.yml
[preflight] Alias paths: /home/devemenc/docroot/drush/sites,/home/devemenc/drush/sites
[preflight] Commandfile search paths: /home/devemenc/vendor/drush/drush/src,/home/devemenc/drush
[bootstrap] Starting bootstrap to max [0.06 sec, 8.58 MB]
[debug] Trying to bootstrap as far as we can [0.06 sec, 8.58 MB]
[bootstrap] Drush bootstrap phase: bootstrapDrupalRoot() [0.06 sec, 8.58 MB]
[bootstrap] Change working directory to /home/devemenc/docroot [0.06 sec, 8.58 MB]
[bootstrap] Initialized Drupal 8.8.3 root directory at /home/devemenc/docroot [0.07 sec, 8.77 MB]
[bootstrap] Drush bootstrap phase: bootstrapDrupalSite() [0.07 sec, 9.06 MB]
[bootstrap] Initialized Drupal site default at sites/default [0.07 sec, 9.23 MB]
[bootstrap] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.07 sec, 9.23 MB]
[warning] Drush command terminated abnormally. [0.07 sec, 9.51 MB]
It crashes trying to load as the autoloader includes this other Drupal in the vendor folder. The error_log reports
[09-Mar-2020 20:40:34 UTC] PHP Fatal error: Cannot redeclare config_get_config_directory() (previously declared in /home/devemenc/docroot/core/includes/bootstrap.inc:214) in /home/devemenc/vendor/drupal/core/includes/bootstrap.inc on line 231
As you can see in the error above, /home/devemenc/docroot/ is the directory where Drupal is installed but there is the mysterious duplicate Drupal directory in the vendor folder /home/devemenc/vendor/drupal/
I wasn't able to find an issue in the configuration after digging through the composer.json and the composer.lock files. I believe that a script must be doing some magic.
I've deleted the vendor folder and the composer.lock file then ran composer update with the same result. It downloads drupal, modules, and themes into the vendor folder.
I've got barn chores!
Fixed
4.0
Configuration
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.