Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Ensure we always install the necessary version of phpunit #305

Closed
kasparsd opened this issue Jul 4, 2019 · 0 comments · Fixed by #306
Closed

Ensure we always install the necessary version of phpunit #305

kasparsd opened this issue Jul 4, 2019 · 0 comments · Fixed by #306
Labels

Comments

@kasparsd
Copy link
Contributor

kasparsd commented Jul 4, 2019

Currently we skip installing phpunit if the binary is found:

if check_should_execute 'phpunit' && ! command -v phpunit >/dev/null 2>&1; then

We should remove the ! command -v phpunit >/dev/null 2>&1; check to ensure we still install the required version of phpunit when it isn't specified as a Composer dependency.

For setups with phpunit required in composer.json it will still use the binary installed by Composer because the Composer bin directory is prepended to the $PATH:

if [ -e composer.json ] && command -v composer >/dev/null 2>&1 && check_should_execute 'composer'; then
PATH="$( composer config bin-dir --absolute ):$PATH"
fi

after the temporary directory is prepended here:

function install_tools {
TEMP_TOOL_PATH="/tmp/dev-lib-bin"
mkdir -p "$TEMP_TOOL_PATH"
PATH="$TEMP_TOOL_PATH:$PATH"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant