Skip to content
Snippets Groups Projects

Re-enable PHPStan job

+ 7
5
@@ -100,20 +100,21 @@ variables:
#
###################################################################################
.extra-variables: &extra-variables
- MODULE_DIR=$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME
# Strip the `-dev` suffix out of $_TARGET_CORE to reveal the name of the Drupal core branch.
- CORE_BRANCH=`echo $_TARGET_CORE | sed -e "s/-dev$//"`
composer:
extends: .composer-base
before_script:
- composer archive --file=module
after_script:
# Ensure the module is physically located within the document root, not just
# symlinked from it.
- MODULE_DIR=$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME
- *extra-variables
- rm -r -f $MODULE_DIR
- mkdir -p $MODULE_DIR
- tar -x -f module.tar -C $MODULE_DIR
- rm module.tar
# Strip the `-dev` suffix out of $_TARGET_CORE to reveal the name of the Drupal core branch.
- CORE_BRANCH=`echo $_TARGET_CORE | sed -e "s/-dev$//"`
- git clone https://git.drupalcode.org/project/drupal.git --depth 1 --branch $CORE_BRANCH /tmp/drupal-core
- mv /tmp/drupal-core/composer $_WEB_ROOT
@@ -124,6 +125,7 @@ phpcs:
phpstan:
before_script:
- *extra-variables
# Ensure our PHPStan configuration has the correct include path to core's PHPStan configuration.
- sed -i "s#%rootDir%/../../../#%rootDir%/../../../$_WEB_ROOT/#" $MODULE_DIR/phpstan.neon
- cat $MODULE_DIR/phpstan.neon
Loading