paketo-buildpacks / composer-install

Apache License 2.0
1 stars 5 forks source link

Check and enable platform reqs before running `composer install` #332

Closed sophiewigmore closed 4 months ago

sophiewigmore commented 4 months ago

Summary

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

Checklist