Skip to content

Commit

Permalink
fix(test): adjust dependencies for PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
alquerci committed Jan 20, 2024
1 parent 19edd4f commit 0e9e01a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions require_for_php8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
swiftmailer/swiftmailer:^5.4.6
egulias/email-validator:^2.1.10
20 changes: 19 additions & 1 deletion test/bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ main ()
populatePHPVersions

tearDownRegisterFunction reset_submodules
tearDownRegisterFunction reset_composer_json

runTests
}
Expand Down Expand Up @@ -181,7 +182,24 @@ install_lowest ()
reset_submodules
${INSTALL_GIT_SUB_MODULE}

${DOCKER_COMPOSE_EXEC} ${c_service} ${COMPOSER_UPDATE} --prefer-lowest
cp "${ROOT_DIR}/composer.json" "${ROOT_DIR}/composer.json~"

if test 80 -le `echo "${c_service}" | sed 's/^php//'`; then
c_depFlags=`cat ${ROOT_DIR}/require_for_php8.txt`

${DOCKER_COMPOSE_EXEC} ${c_service} ${COMPOSER_REQUIRE} ${c_depFlags} --prefer-lowest --update-with-all-dependencies
else
${DOCKER_COMPOSE_EXEC} ${c_service} ${COMPOSER_UPDATE} --prefer-lowest
fi

reset_composer_json
}

reset_composer_json ()
{
if test -f "${ROOT_DIR}/composer.json~"; then
mv "${ROOT_DIR}/composer.json~" "${ROOT_DIR}/composer.json"
else :; fi
}

reset_submodules ()
Expand Down

0 comments on commit 0e9e01a

Please sign in to comment.