Problem/Motivation

Currently we have a composer install step which runs during the assemble_codebase phase.

This is fine for some sanity checks and also other requirements, but it also brings some problems.

It could be that the platform where we perform the code assemble breaks some composer platform requirements which are different from those in the container, such as different PHP versions or available extensions.

We also have some core changes coming where Composer hooks are used to make path-based configurations. For this, we need the container paths rather than the host paths. #2744463: Add phpcs, coder 8.2.8 as --dev requirements for drupal/core

Proposed resolution

Add a composer install plugin which can occur after the containers are available.

Place this plugin in the build definition as the first step during validate_codebase:.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Mile23 created an issue. See original summary.

Mile23’s picture

Issue summary: View changes
Mile23’s picture

Issue summary: View changes

  • Mile23 committed afcdd2a on 2845802-container-composer
    Issue #2845802: Adds ContainerComposer plugin. Tests pass and fail. Adds...
Mile23’s picture

Status: Active » Needs review

Adds a plugin called container_composer.

This terminates the build if Composer errors out for any reason.

Two tests: One tries to install D8 core on PHP 5.3, which fails. The other tries to install on PHP 7, which succeeds.

  • Mixologic committed 0d6c044 on 2845802-container-composer
    Issue #2845802: Updates the CoreModifiedComposerLockPatchTest to also...
Mixologic’s picture

Status: Needs review » Fixed

Yeah, good stuff. I added the error message from composer to the build details, and also to the test (d.o. may want to link to them if they happen). That *might* make the test brittle. Hope not.

Merged into dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.