Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ jobs:
# Create directories with proper permissions for non-root container user
mkdir -p vendor var/cache var/log bin
chmod -R 777 vendor var bin
# --ignore-platform-req=php needed until laminas-ldap adds PHP 8.5 support
# See: https://github.com/laminas/laminas-ldap/issues/62
docker compose run --rm app-tools composer install --no-interaction --prefer-dist --ignore-platform-req=php
# --ignore-platform-req needed for:
# - php: laminas-ldap PHP 8.5 support (https://github.com/laminas/laminas-ldap/issues/62)
# - ext-gd: PHPSpreadsheet requires GD but we only use data export
docker compose run --rm app-tools composer install --no-interaction --prefer-dist --ignore-platform-req=php --ignore-platform-req=ext-gd

- name: Validate composer.json
env:
Expand Down Expand Up @@ -106,7 +107,7 @@ jobs:
COMPOSE_PROFILES: dev
run: |
# Image already built by bake - just install deps and start services
docker compose run --rm app-dev composer install --ignore-platform-req=php
docker compose run --rm app-dev composer install --ignore-platform-req=php --ignore-platform-req=ext-gd
docker compose run --rm app-dev npm install --legacy-peer-deps
docker compose up -d
docker compose exec -T db_unittest mariadb-admin ping -h 127.0.0.1 -uroot -pglobal123 --wait --connect-timeout=60
Expand Down
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,33 @@
# =============================================================================
# COMPOSER - Stage to copy composer binary from
# =============================================================================
FROM ${COMPOSER_IMAGE} AS composer

Check warning on line 23 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${COMPOSER_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

# =============================================================================
# BASE - Runtime with PHP extensions
# =============================================================================
FROM ${PHP_BASE_IMAGE} AS base

Check warning on line 28 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${PHP_BASE_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

# Install system dependencies and PHP extensions in single layer
# Note: GD intentionally omitted - PHPSpreadsheet requires it but we only use data export (no charts/images)
# PHPSpreadsheet decided to keep GD required: https://github.com/PHPOffice/PhpSpreadsheet/pull/3766
# We use --ignore-platform-req=ext-gd in composer install commands
RUN set -ex \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
libzip-dev \
libpng-dev \
libxml2-dev \
libldap2-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libicu-dev \
unzip \
zlib1g-dev \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install \
pdo_mysql \
ldap \
zip \
xml \
gd \
intl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
Expand Down Expand Up @@ -102,9 +100,10 @@

COPY --chown=app:app composer.json composer.lock symfony.lock ./

# --ignore-platform-req=php needed until laminas-ldap adds PHP 8.5 support
# See: https://github.com/laminas/laminas-ldap/issues/62
RUN composer install --no-dev --no-scripts --no-autoloader --ignore-platform-req=php
# --ignore-platform-req needed for:
# - php: laminas-ldap PHP 8.5 support (https://github.com/laminas/laminas-ldap/issues/62)
# - ext-gd: PHPSpreadsheet requires GD but we only use data export, not charts/images
RUN composer install --no-dev --no-scripts --no-autoloader --ignore-platform-req=php --ignore-platform-req=ext-gd

# Copy application code
COPY --chown=app:app . .
Expand All @@ -129,7 +128,7 @@
COPY --from=composer /usr/bin/composer /usr/bin/composer

# Install dev dependencies for static analysis
RUN composer install --ignore-platform-req=php
RUN composer install --ignore-platform-req=php --ignore-platform-req=ext-gd

USER app

Expand Down Expand Up @@ -167,7 +166,7 @@
&& echo 'source /etc/bash_completion.d/symfony' >> /etc/bash.bashrc

# Install dev dependencies
RUN composer install --ignore-platform-req=php
RUN composer install --ignore-platform-req=php --ignore-platform-req=ext-gd

RUN git config --global --add safe.directory '*'

Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ sh:
install: composer-install npm-install

composer-install:
# --ignore-platform-req=php needed until laminas-ldap adds PHP 8.5 support
# See: https://github.com/laminas/laminas-ldap/issues/62
docker compose run --rm app-dev composer install --ignore-platform-req=php
# --ignore-platform-req needed for:
# - php: laminas-ldap PHP 8.5 support (https://github.com/laminas/laminas-ldap/issues/62)
# - ext-gd: PHPSpreadsheet requires GD but we only use data export
docker compose run --rm app-dev composer install --ignore-platform-req=php --ignore-platform-req=ext-gd

composer-update:
docker compose run --rm app-dev composer update
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

The composer-update target should also include the --ignore-platform-req flags for consistency. When developers run "make composer-update", composer will check platform requirements and fail due to the missing ext-gd extension. Add the same flags used in composer-install: --ignore-platform-req=php --ignore-platform-req=ext-gd

Suggested change
docker compose run --rm app-dev composer update
docker compose run --rm app-dev composer update --ignore-platform-req=php --ignore-platform-req=ext-gd

Copilot uses AI. Check for mistakes.
Expand Down