By Mrweiner


2019-06-12 01:22:07 8 Comments

I keep running into the issue that, when requiring a new module with composer, existing packages are removed and reinstalled if they have patches defined in composer.json. For instance,

λ lando composer require drupal/media_entity_browser
    1/2:        https://packages.drupal.org/8/drupal/provider-2019-2$bae9fca7243956d61e44a716bdfb5c872f0f3e1a0b48b1dccfcae53d7e59c86f.json 
    2/2:        https://packages.drupal.org/8/drupal/provider-2019-1$25356ca628b704d49a0ea504e6374f921a2b54d845d142aae1708cb94088516f.json 
    Finished: success: 2, skipped: 0, failure: 0, total: 2
    1/2:        http://repo.packagist.org/p/provider-latest$56447e2294826167894155c32ceb596c58b3b2af059facd78694060f8a4d8c1c.json 
    2/2:        http://repo.packagist.org/p/provider-2019-04$a612146345a708aa360ee61a695dd52d8d0faa79e136de5e075c95860af7c956.json 
    Finished: success: 2, skipped: 0, failure: 0, total: 2
Using version ^[email protected] for drupal/media_entity_browser 
./composer.json has been updated 
Gathering patches for root package. 
Removing package drupal/core so that it can be re-installed and re-patched. 
  - Removing drupal/core (8.7.3)
Deleting web/core - deleted 
> DrupalProject\composer\ScriptHandler::checkComposerVersion 
Loading composer repositories with package information 
Updating dependencies (including require-dev) 
    1/4:        https://ftp.drupal.org/files/projects/media_entity-8.x-1.8.zip 
    2/4:        https://ftp.drupal.org/files/projects/entity-8.x-1.0-rc3.zip 
    3/4:        https://ftp.drupal.org/files/projects/entity_browser-8.x-2.1.zip 
    4/4:        https://ftp.drupal.org/files/projects/media_entity_browser-8.x-1.0-beta3.zip 
    Finished: success: 4, skipped: 0, failure: 0, total: 4
Package operations: 5 installs, 0 updates, 0 removals 
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute

For something like drupal/core this is really a problem on my local as it takes a while to download and reinstall the package. I can't seem to find a pattern. Sometimes it seems that the repatched package is a requirement of the one being required, other times they are unrelated or no packages are repatched at all.

Has anybody else come across this? Is there a way around it? Ideally we'd only re-apply patches to a package when it's updated.

0 comments

Related Questions

Sponsored Content

1 Answered Questions

[SOLVED] Support composer_manager AND drupal-composer/drupal-project with contrib module

  • 2019-02-24 17:42:15
  • donquixote
  • 33 View
  • 0 Score
  • 1 Answer
  • Tags:   7 composer

0 Answered Questions

Alter the generated composer.json on packages.drupal.org for third-party modules

  • 2019-02-24 18:31:40
  • donquixote
  • 36 View
  • 1 Score
  • 0 Answer
  • Tags:   7 composer

1 Answered Questions

1 Answered Questions

[SOLVED] Converting a drupal/drupal site to Work With Composer

  • 2018-11-20 19:22:49
  • Aaron Chamberlain
  • 526 View
  • 0 Score
  • 1 Answer
  • Tags:   8 composer

1 Answered Questions

[SOLVED] Upgrading from 8.3.7 to 8.4 conflicts with acquia/blt-project

  • 2018-09-18 13:49:39
  • fkaufusi
  • 153 View
  • 0 Score
  • 1 Answer
  • Tags:   8 composer

2 Answered Questions

[SOLVED] Why does RELAXed Web Services Not appear in the module list?

  • 2018-05-03 14:54:12
  • James R
  • 122 View
  • 0 Score
  • 2 Answer
  • Tags:   8 composer

1 Answered Questions

[SOLVED] Why doesn't core get updated to 8.5?

  • 2018-04-10 19:15:21
  • ARMANDO SILVA
  • 236 View
  • 2 Score
  • 1 Answer
  • Tags:   updating composer

1 Answered Questions

Ovh and composer

  • 2017-12-07 09:23:40
  • Selinav
  • 154 View
  • 0 Score
  • 1 Answer
  • Tags:   composer

1 Answered Questions

[SOLVED] How can I upgrade ONLY Drupal core with composer?

  • 2017-08-14 19:12:36
  • RaisinBranCrunch
  • 952 View
  • 4 Score
  • 1 Answer
  • Tags:   8 updating composer

1 Answered Questions

[SOLVED] How to update 8.0.x to 8.1.x with composer?

  • 2016-04-18 20:02:54
  • SiliconMind
  • 3182 View
  • 3 Score
  • 1 Answer
  • Tags:   8 composer

Sponsored Content