composer install not working

Klein-Hans Escuton April 7, 2021

Capture12.PNG

1 answer

0 votes
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2021

Heja @Klein-Hans Escuton , welcome to the Atlassian Community.

The error message you posted can be boiled down to that the container you're running composer install in does not have the PHP ZIP extension.

Installing it into a container is normally straight forward, however it depends a bit which container that is which I can not see from your report. If you add a bit more information, this may be easy to overcome.

One way to do this is to create a container with your PHP requirements and then use it within the pipeline. E.g. a Dockerfile and a build process in your git repository.

As an alternative especially within a CI pipeline, not every container must full-fill every requirement of the whole project. E.g. when executing unit-tests that don't touch those parts (phpoffice here), the `ext-zip` (this is the composer requirement for the PHP ZIP extension) is technically no required to let the build pass. A unit-test runner like Phpunit is just an example here, building a package artifact could be another not requiring ext-zip.

If there is no such requirement for that pipeline step, you can tell composer to install without these checks, see the --ignore-platform-reqs argument for the composer install command.

Mind the gap though: Testing or packaging with a different PHP version can lead to unwanted side-effects and/or degradation of the build.

Feel free to share some more details like an excerpt from your bitbucket-pipelines.yml and your further questions.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events