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:.
Comments
Comment #2
Mile23Comment #3
Mile23Comment #5
Mile23Adds 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.
Comment #7
MixologicYeah, 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.