about summary refs log tree commit diff
path: root/pkgs/build-support/php/hooks/composer-install-hook.sh
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-08-21 12:19:17 +0200
committerPol Dellaiera <pol.dellaiera@protonmail.com>2023-09-13 17:08:04 +0200
commit3eb168da9243989a63dfd4e2c17c52f8c133247b (patch)
treed54a546577ff7c81883c4ff819071311c71f795a /pkgs/build-support/php/hooks/composer-install-hook.sh
parent1173a34d151b2797a4933a3eb2446e8dbdffcb1e (diff)
build-support/php: add `composerNoDev`, `composerNoPlugins` and `composerNoScripts` attributes
Diffstat (limited to 'pkgs/build-support/php/hooks/composer-install-hook.sh')
-rw-r--r--pkgs/build-support/php/hooks/composer-install-hook.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/build-support/php/hooks/composer-install-hook.sh b/pkgs/build-support/php/hooks/composer-install-hook.sh
index 2d5c90ea3b2fa..9f23b90fa401d 100644
--- a/pkgs/build-support/php/hooks/composer-install-hook.sh
+++ b/pkgs/build-support/php/hooks/composer-install-hook.sh
@@ -1,6 +1,8 @@
-declare composerHomeDir
 declare composerRepository
 declare version
+declare composerNoDev
+declare composerNoPlugins
+declare composerNoScripts
 
 preConfigureHooks+=(composerInstallConfigureHook)
 preBuildHooks+=(composerInstallBuildHook)
@@ -59,8 +61,9 @@ composerInstallBuildHook() {
       --no-ansi \
       --no-install \
       --no-interaction \
-      --no-plugins \
-      --no-scripts \
+      ${composerNoDev:+--no-dev} \
+      ${composerNoPlugins:+--no-plugins} \
+      ${composerNoScripts:+--no-scripts} \
       update
 
     echo "Finished composerInstallBuildHook"
@@ -88,8 +91,9 @@ composerInstallInstallHook() {
     composer \
       --no-ansi \
       --no-interaction \
-      --no-scripts \
-      --no-plugins \
+      ${composerNoDev:+--no-dev} \
+      ${composerNoPlugins:+--no-plugins} \
+      ${composerNoScripts:+--no-scripts} \
       install
 
     # Remove packages.json, we don't need it in the store.