Update FixtureManipulator to work with InstalledPackagesList, real composer show command

Created on 22 February 2023, almost 2 years ago
Updated 10 March 2023, almost 2 years ago

Problem/Motivation

Now that πŸ“Œ Add new InstalledPackagesList which does not rely on Composer API to get package info Fixed means we can use real composer show to determine which packages are installed we have the problem that FixtureManipulator actually won't work for using `composer show`.

πŸ“Œ Benchmark how slow using composer require would be in kernel tests Fixed shows that changing all our tests to real composer show and composer require for packages could slow our tests, 5x to 10x we will need to figure out how to deal with the problem in FixtureManipulator.

Steps to reproduce

Proposed resolution

First attempt

Tried to update FixtureManipulator to also update the composer.lock file. It was actually more complicated we also needed to update the vendor directory

We could probably get this to work but it is much more complicated after πŸ“Œ Run `composer validate` after FixtureManipulator commits its changes Fixed add FixtureManipulator::validateComposer(). Every time I fixed 1 validation error another popped up

Second attempt

Updating to FixtureManipulator to call real composer commands

This will have less problems with FixtureManipulator::validateComposer() because don't have to worry about editing the internal composer metadata files directly.

It is also easier to understand because you don't need to know how Composer store info internal files like installed.json and installed.php you just need to know about path repos and basic Composer commands.

It should also be less brittle because it does depend on the formats of internal Composer files.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

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

Comments & Activities

Production build 0.71.5 2024