- 🇬🇧United Kingdom joachim
It's done it here too: #3286541: Automated Drupal 10 compatibility fixes →
- 🇳🇱Netherlands bbrala Netherlands
Think i've fixed this for d11 readiness. But i have not backported that to the d10.
Thwe change was pretty minimal, think the folowing should be enough.
Subject: [PATCH] Use source but without .git directory --- Index: analyzer.sh IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/analyzer.sh b/analyzer.sh --- a/analyzer.sh (revision 61a9315ccc7866b91b3963ad39b6eb59b816dad4) +++ b/analyzer.sh (revision e8cf5467a3a6e3899c779721a98f9c9847aa7c87) @@ -35,11 +35,14 @@ # Add the requested project to this composer environment (${WORKSPACE_NUMBER} is the number of this workspace, ${MACHINE_NAME} is project name, ${COMPOSER_NAME} is the composer name and ${VERSION} is the version). cd $CHECKOUT_DIR || exit 1 -COMPOSER_MEMORY_LIMIT=-1 COMPOSER_CACHE_DIR=${CHECKOUT_BASE_DIR}/cache${WORKSPACE_NUMBER} composer --no-interaction --no-progress require drupal/${COMPOSER_NAME} ${COMPOSER_VERSION} 2>> ${WORKSPACE_DIR}/phpstan-results/${MACHINE_NAME}/${MACHINE_NAME}.${VERSION}.phpstan_stderr +COMPOSER_MEMORY_LIMIT=-1 COMPOSER_CACHE_DIR=${CHECKOUT_BASE_DIR}/cache${WORKSPACE_NUMBER} composer --no-interaction --no-progress require drupal/${COMPOSER_NAME} ${COMPOSER_VERSION} --prefer-source 2>> ${WORKSPACE_DIR}/phpstan-results/${MACHINE_NAME}/${MACHINE_NAME}.${VERSION}.phpstan_stderr # Ensure the directory was created where we thought it should be based on the project machine name. if [[ -d "$CHECKOUT_DIR/${EXTENTION_TYPE#project_}s/contrib/${MACHINE_NAME}" ]]; then + # We prefer source to work around the packaging issues of Drupal.org, but we dont want no .git directories. + rm -rf "$CHECKOUT_DIR/${EXTENTION_TYPE#project_}s/contrib/${MACHINE_NAME}/.git" + # Set file paths relative to our workspace, so they don't mix up between workspaces. php -d sys_temp_dir=$CHECKOUT_DIR -d upload_tmp_dir=$CHECKOUT_DIR ./vendor/bin/drush --root=$CHECKOUT_DIR config-set system.file path.temporary $CHECKOUT_DIR/sites/default/files/temp
So, composer require --prefer-source, then remove the .git directory so we can just work with the code as we always did.