···22declare -g -i composerStrictValidation="${composerStrictValidation:-0}"
3344setComposerRootVersion() {
55- if [[ -n $version ]]; then
66- echo -e "\e[32mSetting COMPOSER_ROOT_VERSION to $version\e[0m"
77- export COMPOSER_ROOT_VERSION="$version"
88- fi
55+ if [[ -n $version ]]; then
66+ echo -e "\e[32mSetting COMPOSER_ROOT_VERSION to $version\e[0m"
77+ export COMPOSER_ROOT_VERSION="$version"
88+ fi
99}
10101111setComposerEnvVariables() {
1212- echo -e "\e[32mSetting some required environment variables for Composer...\e[0m"
1313- export COMPOSER_MIRROR_PATH_REPOS=1
1414- export COMPOSER_HTACCESS_PROTECT=0
1515- export COMPOSER_FUND=0
1212+ echo -e "\e[32mSetting some required environment variables for Composer...\e[0m"
1313+ export COMPOSER_MIRROR_PATH_REPOS=1
1414+ export COMPOSER_HTACCESS_PROTECT=0
1515+ export COMPOSER_FUND=0
1616}
17171818checkComposerValidate() {
1919- command="composer validate --strict --quiet --no-interaction --no-check-all --no-check-lock"
2020- if ! $command; then
2121- echo
2222- echo -e "\e[31mERROR: composer files validation failed\e[0m"
2323- echo
2424- echo -e '\e[31mThe validation of the composer.json failed.\e[0m'
2525- echo -e '\e[31mMake sure that the file composer.json is valid.\e[0m'
2626- echo
2727- echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m'
2828- echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information, and apply any available remote patches as a temporary solution '\('with fetchpatch'\)'.\e[0m'
2929- echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m'
3030- echo
1919+ command="composer validate --strict --quiet --no-interaction --no-check-all --no-check-lock"
2020+ if ! $command; then
2121+ echo
2222+ echo -e "\e[31mERROR: composer files validation failed\e[0m"
2323+ echo
2424+ echo -e '\e[31mThe validation of the composer.json failed.\e[0m'
2525+ echo -e '\e[31mMake sure that the file composer.json is valid.\e[0m'
2626+ echo
2727+ echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m'
2828+ echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information, and apply any available remote patches as a temporary solution '\('with fetchpatch'\)'.\e[0m'
2929+ echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m'
3030+ echo
31313232- if [[ "${composerStrictValidation}" == "1" ]]; then
3333- echo
3434- echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m'
3535- echo
3636- exit 1
3737- else
3838- echo
3939- echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m'
4040- echo
4141- fi
3232+ if [[ "${composerStrictValidation}" == "1" ]]; then
3333+ echo
3434+ echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m'
3535+ echo
3636+ exit 1
3737+ else
3838+ echo
3939+ echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m'
4040+ echo
4241 fi
4242+ fi
43434444- command="composer validate --strict --no-ansi --no-interaction --quiet --no-check-all --check-lock"
4545- if ! $command; then
4646- echo
4747- echo -e "\e[31mERROR: composer files validation failed\e[0m"
4848- echo
4949- echo -e '\e[31mThe validation of the composer.json and composer.lock failed.\e[0m'
5050- echo -e '\e[31mMake sure that the file composer.lock is consistent with composer.json.\e[0m'
5151- echo
5252- echo -e '\e[31mThis often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.\e[0m'
5353- echo
5454- echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m'
5555- echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information '\('run '\''composer update --lock --no-install'\'' to fix the issue'\)', and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m'
5656- echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m'
5757- echo
4444+ command="composer validate --strict --no-ansi --no-interaction --quiet --no-check-all --check-lock"
4545+ if ! $command; then
4646+ echo
4747+ echo -e "\e[31mERROR: composer files validation failed\e[0m"
4848+ echo
4949+ echo -e '\e[31mThe validation of the composer.json and composer.lock failed.\e[0m'
5050+ echo -e '\e[31mMake sure that the file composer.lock is consistent with composer.json.\e[0m'
5151+ echo
5252+ echo -e '\e[31mThis often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.\e[0m'
5353+ echo
5454+ echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m'
5555+ echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information '\('run '\''composer update --lock --no-install'\'' to fix the issue'\)', and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m'
5656+ echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m'
5757+ echo
58585959- if [[ "${composerStrictValidation}" == "1" ]]; then
6060- echo
6161- echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m'
6262- echo
6363- exit 1
6464- else
6565- echo
6666- echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m'
6767- echo
6868- fi
5959+ if [[ "${composerStrictValidation}" == "1" ]]; then
6060+ echo
6161+ echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m'
6262+ echo
6363+ exit 1
6464+ else
6565+ echo
6666+ echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m'
6767+ echo
6968 fi
6969+ fi
7070}