about summary refs log tree commit diff
path: root/pkgs/build-support/php/hooks/composer-repository-hook.sh
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2024-03-05 15:25:16 +0100
committerPol Dellaiera <pol.dellaiera@protonmail.com>2024-03-05 19:39:35 +0100
commitbc627a6acad591f05e8b879a9388137859e10855 (patch)
tree949d6b94bf7fb95945dfa93b1519c927e2d92d32 /pkgs/build-support/php/hooks/composer-repository-hook.sh
parentcf9e77ef8e6c7b903c7dd5b37d3753c65b3c6a13 (diff)
build-support/php: move functions around (dry)
Diffstat (limited to 'pkgs/build-support/php/hooks/composer-repository-hook.sh')
-rw-r--r--pkgs/build-support/php/hooks/composer-repository-hook.sh21
1 files changed, 1 insertions, 20 deletions
diff --git a/pkgs/build-support/php/hooks/composer-repository-hook.sh b/pkgs/build-support/php/hooks/composer-repository-hook.sh
index ffec58e552931..762e762761cc4 100644
--- a/pkgs/build-support/php/hooks/composer-repository-hook.sh
+++ b/pkgs/build-support/php/hooks/composer-repository-hook.sh
@@ -71,26 +71,7 @@ composerRepositoryBuildHook() {
 composerRepositoryCheckHook() {
     echo "Executing composerRepositoryCheckHook"
 
-    if ! composer validate --strict --no-ansi --no-interaction --quiet; then
-        if [ ! -z "${composerStrictValidation-}" ]; then
-            echo
-            echo -e "\e[31mERROR: composer files validation failed\e[0m"
-            echo
-            echo -e '\e[31mThe validation of the composer.json and composer.lock failed.\e[0m'
-            echo -e '\e[31mMake sure that the file composer.lock is consistent with composer.json.\e[0m'
-            echo
-            exit 1
-        else
-            echo
-            echo -e "\e[33mWARNING: composer files validation failed\e[0m"
-            echo
-            echo -e '\e[33mThe validation of the composer.json and composer.lock failed.\e[0m'
-            echo -e '\e[33mMake sure that the file composer.lock is consistent with composer.json.\e[0m'
-            echo
-            echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m'
-            echo
-        fi
-    fi
+    checkComposerValidate
 
     echo "Finished composerRepositoryCheckHook"
 }