Skip to content

Commit

Permalink
Feature: Remove Composer 1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
michielgerritsen committed Nov 25, 2024
1 parent 4780aee commit 3cdd886
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion magento/Dockerfile-2.3
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,25 @@ ARG SAMPLE_DATA=false
ENV CI=true
ENV URL=http://localhost/
ENV FLAT_TABLES=false
ENV COMPOSER_VERSION=1

COPY scripts/retry retry
COPY scripts/install-phpstan.php scripts/install-phpstan.php
COPY scripts/allow-composer-plugins.php scripts/allow-composer-plugins.php
COPY patches/vertex-compilation-issue.patch vertex-compilation-issue.patch
COPY patches/APSB22-12/MDVA-43395_EE_2.4.3-p1_COMPOSER_v1.patch MDVA-43395_EE_2.4.3-p1_COMPOSER_v1.patch
COPY patches/APSB22-12/MDVA-43443_EE_2.3.4_COMPOSER_v1.patch MDVA-43443_EE_2.3.4_COMPOSER_v1.patch
COPY patches/APSB22-12/MDVA-43443_EE_2.4.2-p2_COMPOSER_v1.patch MDVA-43443_EE_2.4.2-p2_COMPOSER_v1.patch
COPY templates/memory-limit-php.ini /usr/local/etc/php/conf.d/memory-limit-php.ini

RUN ./start-services && \
composer self-update --2 && \
echo "Composer version:" && \
composer --version && \
curl -o magento.zip https://repo-magento-mirror.fooman.co.nz/dist/magento/$MAGENTO_TYPE/magento-$MAGENTO_TYPE-$MAGENTO_VERSION.zip && \
unzip -q magento.zip -d . && \
rm magento.zip && \
php scripts/allow-composer-plugins.php && \
rm scripts/allow-composer-plugins.php && \
composer config --unset repositories.0 && \
composer config repositories.fooman composer https://repo-magento-mirror.fooman.co.nz/ && \
./retry "composer install" && \
Expand Down
5 changes: 3 additions & 2 deletions magento/Dockerfile-2.4
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ COPY scripts/patch-AC2855.php scripts/patch-AC2855.php
COPY templates/memory-limit-php.ini /usr/local/etc/php/conf.d/memory-limit-php.ini

RUN ./start-services && \
if (( $(php -r 'echo version_compare(getenv("MAGENTO_VERSION"), "2.4.2", "<=") ? "true" : "false";') = "true" )); then composer self-update --1; else composer self-update --2; fi && \
composer self-update --2 && \
echo "Composer version:" && \
composer --version && \
curl -o magento.zip https://repo-magento-mirror.fooman.co.nz/dist/magento/$MAGENTO_TYPE/magento-$MAGENTO_TYPE-$MAGENTO_VERSION.zip && \
unzip -q magento.zip -d . && \
rm magento.zip && \
if (( $(php -r 'echo version_compare(getenv("MAGENTO_VERSION"), "2.4.2", "<=") ? "true" : "false";') = "true" )); then echo "Using Composer version 1 so skipping allow-plugins"; else php scripts/allow-composer-plugins.php rm scripts/allow-composer-plugins.php; fi && \
php scripts/allow-composer-plugins.php && \
rm scripts/allow-composer-plugins.php && \
composer config --unset repositories.0 && \
composer config repositories.fooman composer https://repo-magento-mirror.fooman.co.nz/ && \
if [ "$MAGENTO_VERSION" = "2.4.4" ]; then composer require "magento/security-package:1.1.3-p1 as 1.1.3" --no-update; fi && \
Expand Down

0 comments on commit 3cdd886

Please sign in to comment.