Skip to content

Commit

Permalink
[composer] fix composer config script for lower versions and limit pl…
Browse files Browse the repository at this point in the history
…ugins allowed
  • Loading branch information
Benjamin Calef committed Oct 13, 2022
1 parent 8ca7f0d commit 59c8d8e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions provision/110-magento-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ else
rm -f "$PROJECT_BUILD"/app/etc/config.php "$PROJECT_BUILD"/app/etc/env.php
fi

echo '--- composer allow-plugins ---'
sudo -u vagrant composer config -d "$PROJECT_BUILD" --no-interaction --no-plugins allow-plugins.*/* true

# Composer install
echo '--- composer allow-plugins ---'
COMPOSER_VERSION=$(composer -V | cut -d " " -f 3);
if $(dpkg --compare-versions "${COMPOSER_VERSION}" "ge" "2.0"); then
sudo -u vagrant composer config -d "$PROJECT_BUILD" --no-interaction --no-plugins "allow-plugins.magento/*" true
sudo -u vagrant composer config -d "$PROJECT_BUILD" --no-interaction --no-plugins "allow-plugins.laminas/laminas-dependency-plugin" true
sudo -u vagrant composer config -d "$PROJECT_BUILD" --no-interaction --no-plugins "allow-plugins.dealerdirect/phpcodesniffer-composer-installer" true
sudo -u vagrant composer config -d "$PROJECT_BUILD" --no-interaction --no-plugins "allow-plugins.magento-composer-installer" true
fi
sudo -u vagrant COMPOSER_MEMORY_LIMIT=-1 composer install -d "$PROJECT_BUILD" --no-progress --no-interaction

# Rsync directory
Expand Down

0 comments on commit 59c8d8e

Please sign in to comment.