From 2f2a90e464a0c83fc623e85f6a606eddbbf5ec1f Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Tue, 16 Nov 2021 08:23:46 +0530 Subject: [PATCH] Add workaround to ensure PHPUnit installed by setup-php is used along with PHPUnit-Polyfills --- src/scripts/tools/add_tools.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scripts/tools/add_tools.sh b/src/scripts/tools/add_tools.sh index b78f5620..29c242fe 100644 --- a/src/scripts/tools/add_tools.sh +++ b/src/scripts/tools/add_tools.sh @@ -18,6 +18,10 @@ add_tools_helper() { add_extension fileinfo extension >/dev/null 2>&1 sudo ln -s "${tool_path:?}" "${tool_path_dir:?}"/phpdocumentor 2>/dev/null || true sudo ln -s "${tool_path:?}" "${tool_path_dir:?}"/phpdoc + elif [[ "$tool" =~ phpunit(-polyfills)?$ ]]; then + if [ -e "${tool_path_dir:?}"/phpunit ]; then + sudo cp "${tool_path_dir:?}"/phpunit "${composer_bin:?}" + fi elif [[ "$tool" =~ (symfony|vapor|wp)-cli ]]; then sudo ln -s "${tool_path:?}" "${tool_path_dir:?}"/"${tool%-*}" fi