Optimize Composer calls in FixtureManipulator

Created on 1 March 2023, over 1 year ago
Updated 4 May 2023, over 1 year ago

Problem/Motivation

Follow-up to ๐Ÿ“Œ Update FixtureManipulator to work with InstalledPackagesList, real composer show command Fixed where we change our manipulator to use real composer commands

Right now if you do this.

    (new ActiveFixtureManipulator())
      ->addPackage([
        'name' => "drupal/dependency",
        'version' => '9.8.0',
        'type' => 'drupal-library',
      ])
      ->addPackage([
        'name' => "drupal/semver_test",
        'version' => '8.1.0',
        'type' => 'drupal-module',
      ])
      ->commitChanges();

It will result in 2 calls to `composer require` when it could be done in 1

Proposed resolution

Change Fixture Manipulator to only make as many Composer as needed.

We should be able to group calls for `require` and `remove` commands. We would have to also group by dev and non-dev packages.

๐Ÿ“Œ Task
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024