Composer Scaffold Vendor Duplication

Created on 22 December 2022, almost 2 years ago
Updated 12 September 2024, 2 months ago

Problem/Motivation

When attempting to update a project from core 9.4.7 to core 9.5.0 (along with the drupal/core-composer-scaffold) plugin, I have issues where all of the Drupal folders remain in vendor/drupal. The files do properly get placed in my webroot (for me, that's docroot) but they do not get properly removed from vendor/drupal when install concludes. This is a super wonky problem, but a few things I've observed:

  1. Pinning to drupal/core-composer-scaffold 9.4.7 or removing it entirely resolves this problem. So, something in the (VERY MINOR) change that occurred https://github.com/drupal/core-composer-scaffold/compare/9.4.7...9.5.0 is likely to blame? Somehow?
  2. I didn't run into this on one project, but did on a second. At further examination, the project that "worked" has multiple custom repositories defined and if I add additional repositories to the broken project, it starts working too.
  3. There are no clear errors / problems, the only reason I discovered this was my includes for DRUPAL_ROOT started throwing PHP Fatals after the update

Steps to reproduce

1. Clone https://github.com/Drupal4Gov/drupal4gov.us
2. Run a composer install
3. check vendor/drupal (should be ok)
4. run composer update "drupal/core*" -W (should update to 9.5.x)
5. check vendor/drupal (will now contain core and all the contrib modules)

after the above, if you remove the core/core-composer-scaffold, nuke the vendor folder, and re-run the composer update it should be fine. if you re-add core-composer-scaffold but pin to 9.4.7, nuke the vendor directory, and re-run composer update it should be fine. there's something about the 9.5.0 version of this that is problematic.

Proposed resolution

Either roll back the code change in https://github.com/drupal/core-composer-scaffold/compare/9.4.7...9.5.0 or iterate on the proposed approach to address this edge case.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: cannot reproduce

Version

11.0 πŸ”₯

Component
ComposerΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States mikemadison Seattle, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Additional info was requested in #20

    For what it's worth when we upgraded all our 9.4 sites to 9.5 no one reported this issue.

  • Status changed to Postponed: needs info almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States mile23 Seattle, WA

    Based on #20 and #21.

  • Status changed to Closed: cannot reproduce 2 months ago
  • πŸ‡¦πŸ‡ΊAustralia pameeela

    Closing this since there hasn't been any additional info provided after it was requested more than a year ago.

Production build 0.71.5 2024