Resolve test failures related to composer install with Composer 2.7.7 by checking/enabling platform reqs before running composer install:
[builder] Running 'composer install --no-progress --no-dev'
[builder] Composer could not detect the root package (paketo/composer_app) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
[builder] Installing dependencies from lock file
[builder] Verifying lock file contents can be installed on current platform.
[builder] Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
[builder] Your lock file does not contain a compatible set of packages. Please run composer update.
[builder]
[builder] Problem 1
[builder] - Root composer.json requires PHP extension ext-zip * but it is missing from your system. Install or enable PHP's zip extension.
[builder] Problem 2
[builder] - Root composer.json requires PHP extension ext-gd * but it is missing from your system. Install or enable PHP's gd extension.
[builder] Problem 3
[builder] - Root composer.json requires PHP extension ext-fileinfo * but it is missing from your system. Install or enable PHP's fileinfo extension.
[builder] Problem 4
[builder] - Root composer.json requires PHP extension ext-mysqli * but it is missing from your system. Install or enable PHP's mysqli extension.
[builder]
[builder] To enable extensions, verify that they are enabled in your .ini files:
[builder] - /layers/paketo-buildpacks_composer-install/composer-php-ini/composer-php.ini
[builder] - /layers/paketo-buildpacks_php-dist/php/etc/buildpack.ini
[builder] - /layers/paketo-buildpacks_php-dist/php/etc/php.ini
[builder] - /layers/paketo-buildpacks_php-dist/php/etc/buildpack.ini
[builder] - /layers/paketo-buildpacks_php-dist/php/etc/php.ini
[builder] You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
[builder] Alternatively, you can run Composer with `--ignore-platform-req=ext-zip --ignore-platform-req=ext-gd --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-mysqli` to temporarily ignore these required extensions.
[builder] exit status 2
[builder] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
We previously checked extensions, and made them available after composer install ran
As of Composer 2.7.7, composer install includes a platform reqs check against the composer.json and composer.lock files. This check requires the extensions to be loaded/available to composer when the install command runs.
testdata: update app composer.lock
Checklist
[X] I have viewed, signed, and submitted the Contributor License Agreement.
[ ] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[X] I have added an integration test, if necessary.
[X] I have reviewed the styleguide for guidance on my code quality.
[X] I'm happy with the commit history on this PR (I have rebased/squashed as needed).
Summary
Resolve test failures related to
composer install
with Composer 2.7.7 by checking/enabling platform reqs before runningcomposer install
:We previously checked extensions, and made them available after
composer install
ranAs of Composer 2.7.7,
composer install
includes a platform reqs check against the composer.json and composer.lock files. This check requires the extensions to be loaded/available to composer when the install command runs.testdata: update app composer.lock
Checklist