From b7b9de7f3fc4444630e18720e0e68834de7cc682 Mon Sep 17 00:00:00 2001 From: Matt Glaman Date: Wed, 16 Jun 2021 15:14:51 -0500 Subject: [PATCH] Issue #3219157: Support Windows file paths --- .github/workflows/functional_test__rector_examples.yml | 9 ++++++--- rector.php | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/functional_test__rector_examples.yml b/.github/workflows/functional_test__rector_examples.yml index 626382f8..c3896f49 100644 --- a/.github/workflows/functional_test__rector_examples.yml +++ b/.github/workflows/functional_test__rector_examples.yml @@ -7,7 +7,10 @@ jobs: run_functional_test: name: Run functional test # START: SHARED SETUP - runs-on: ubuntu-latest + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest', 'windows-latest'] steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v2 @@ -23,14 +26,14 @@ jobs: # START: SHARED DRUPAL INSTALL SETUP - name: Setup Drupal run: | - COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:~8 ../drupal --no-interaction + composer create-project drupal/recommended-project:~8 ../drupal --no-interaction cd .. mv drupal/* . composer config minimum-stability dev composer config prefer-stable true composer config preferred-install dist composer config repositories.drupal composer https://packages.drupal.org/8 - COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev:~8 --with-all-dependencies + composer require drupal/core-dev:~8 --with-all-dependencies # We add a local repository `repositories.0` which takes precendence over the packagist repository that is automatically added. - name: Install Drupal Rector run: | diff --git a/rector.php b/rector.php index f23db143..ca5a5811 100644 --- a/rector.php +++ b/rector.php @@ -15,10 +15,10 @@ $drupalFinder->locateRoot(__DIR__); $drupalRoot = $drupalFinder->getDrupalRoot(); $parameters->set(Option::AUTOLOAD_PATHS, [ - $drupalRoot . '/core', - $drupalRoot . '/modules', - $drupalRoot . '/profiles', - $drupalRoot . '/themes' + \realpath($drupalRoot . '/core'), + \realpath($drupalRoot . '/modules'), + \realpath($drupalRoot . '/profiles'), + \realpath($drupalRoot . '/themes') ]); $parameters->set(Option::SKIP, ['*/upgrade_status/tests/modules/*']);