diff --git a/lib/stages/deprecation.sh b/lib/stages/deprecation.sh index 6fe6701..133da16 100644 --- a/lib/stages/deprecation.sh +++ b/lib/stages/deprecation.sh @@ -1,16 +1,19 @@ #!/usr/bin/env bash _stage_deprecation() { - printf "Checking for deprecations.\n\n" + if ${DRUPAL_TESTING_TEST_DEPRECATION}; then + printf "Checking for deprecations.\n\n" - local project_location - local composer_bin_dir + local project_location + local composer_bin_dir - project_location=$(get_project_location) - composer_bin_dir=$(get_composer_bin_directory) + project_location=$(get_project_location) + composer_bin_dir=$(get_composer_bin_directory) + + if [ ! -f "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/phpstan.neon" ]; then + cp phpstan.neon "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" + fi - if ${DRUPAL_TESTING_TEST_DEPRECATION}; then - cp phpstan.neon "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" cd "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" || exit "${composer_bin_dir}/phpstan" analyse --memory-limit "${PHPSTAN_MEMORY_LIMIT}" "${project_location}" cd - || exit