Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove Infection during Docker release #7937

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

Wirone
Copy link
Member

@Wirone Wirone commented Apr 11, 2024

It's causing failures during Docker build:

 => [dist 4/6] COPY php-cs-fixer /fixer/php-cs-fixer                                                                                                                                                                                0.0s
------
 > [vendor 3/3] RUN composer install --prefer-dist --no-dev --optimize-autoloader --no-scripts:
[...]
1.875 Updating dependencies
1.886 Your requirements could not be resolved to an installable set of packages.
1.886 
1.886   Problem 1
1.886     - Root composer.json requires infection/infection ^0.27.11 -> satisfiable by infection/infection[0.27.11].
1.886     - infection/infection 0.27.11 requires php ^8.1 -> your php version (7.4.33) does not satisfy that requirement.
1.886 
1.886 Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
------
Dockerfile:28
--------------------
  26 |     COPY composer.json /fixer/composer.json
  27 |     WORKDIR /fixer
  28 | >>> RUN composer install --prefer-dist --no-dev --optimize-autoloader --no-scripts
  29 |     
  30 |     FROM base as dist
--------------------
ERROR: failed to solve: process "/bin/sh -c composer install --prefer-dist --no-dev --optimize-autoloader --no-scripts" did not complete successfully: exit code: 2

@Wirone Wirone added the topic/docker Docker distribution, development runtime label Apr 11, 2024
@Wirone Wirone self-assigned this Apr 11, 2024
@Wirone Wirone enabled auto-merge (squash) April 11, 2024 11:02
@coveralls
Copy link

coveralls commented Apr 11, 2024

Coverage Status

coverage: 96.013%. remained the same
when pulling 6980ee6 on Wirone:codito/docker-infection
into 5aae628 on PHP-CS-Fixer:master.

@Wirone Wirone merged commit 64567d1 into PHP-CS-Fixer:master Apr 11, 2024
32 checks passed
@Wirone Wirone deleted the codito/docker-infection branch April 11, 2024 11:12
@@ -25,7 +25,8 @@ COPY --from=composer/composer:2-bin /composer /usr/local/bin/composer
FROM base-dev as vendor
COPY composer.json /fixer/composer.json
WORKDIR /fixer
RUN composer install --prefer-dist --no-dev --optimize-autoloader --no-scripts
RUN composer remove --dev infection/infection --no-update \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a job on PR that verifies if docker image is buildable and runnable, similar like we do with phar file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I personally would like to change our CI and instead of preparing PHP runtimes using shivammathur/setup-php, I would build Docker images and run all QA jobs on them (dev jobs on dev images, Fixer on release-like image). Then we would always know it's buildable and in sync with local development. But yeah, for now the job in PR that checks if Docker builds would be enough and really nice to see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/docker Docker distribution, development runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants