Skip to content

Commit 7b6c618

Browse files
authored
Fix build and deprecated usages of excludes_analyse (#235)
1 parent 35cbe19 commit 7b6c618

File tree

5 files changed

+12
-51
lines changed

5 files changed

+12
-51
lines changed

Diff for: .circleci/config.yml

-19
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,6 @@ jobs:
141141
command: |
142142
cd /tmp/drupal
143143
./vendor/bin/drupal-check -vvv web/core/modules/dynamic_page_cache
144-
test_lightning:
145-
<<: *defaults
146-
steps:
147-
- setup-job
148-
# acquia/lightning-project does not require-dev Drupal's require-dev.
149-
# see PR https://github.com/acquia/lightning-project/pull/101
150-
- create-drupal-project:
151-
project: 'acquia/lightning-project'
152-
require_dev: false
153-
- global-require
154-
- run:
155-
name: Global - Run against a file
156-
command: |
157-
drupal-check /tmp/drupal/docroot/core/install.php
158-
# - run:
159-
# name: Global - Run against a module
160-
# command: |
161-
# drupal-check /tmp/drupal/docroot/core/modules/dynamic_page_cache
162144
test_contrib:
163145
<<: *defaults
164146
steps:
@@ -222,7 +204,6 @@ workflows:
222204
- lint
223205
- test_drupal
224206
- test_drupal_project
225-
- test_lightning
226207
- test_global_require_with_drush
227208
- test_symfony_console_conflict
228209
- test_contrib

Diff for: .github/workflows/php.yml

+8-28
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,10 @@ jobs:
4848
- name: Remove vendor directory for integration testing
4949
run: rm -rf vendor
5050
- name: Setup Drupal
51-
run: |
52-
COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }} ~/drupal --no-interaction
53-
cd ~/drupal
54-
composer config minimum-stability dev
55-
composer config prefer-stable true
56-
composer config preferred-install dist
57-
composer config repositories.0 "{\"type\": \"path\", \"url\": \"$GITHUB_WORKSPACE\", \"options\": {\"symlink\": false}}"
58-
composer config repositories.1 composer https://packages.drupal.org/8
59-
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev:${{ matrix.drupal }} --with-all-dependencies
60-
- name: "Add phpspec/prophecy-phpunit"
61-
run: |
62-
cd ~/drupal
63-
COMPOSER_MEMORY_LIMIT=-1 composer require --dev phpspec/prophecy-phpunit:^2
64-
if: ${{ matrix.drupal == '^9.0' }}
51+
uses: bluehorndigital/[email protected]
52+
with:
53+
version: ${{ matrix.drupal }}
54+
path: ~/drupal
6555
- name: "require drupal-check"
6656
run: |
6757
cd ~/drupal
@@ -102,20 +92,10 @@ jobs:
10292
tools: composer:v2
10393
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv
10494
- name: Setup Drupal
105-
run: |
106-
COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }} ~/drupal --no-interaction
107-
cd ~/drupal
108-
composer config minimum-stability dev
109-
composer config prefer-stable true
110-
composer config preferred-install dist
111-
composer config repositories.0 "{\"type\": \"path\", \"url\": \"$GITHUB_WORKSPACE\", \"options\": {\"symlink\": false}}"
112-
composer config repositories.1 composer https://packages.drupal.org/8
113-
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev:${{ matrix.drupal }} --with-all-dependencies
114-
- name: "Add phpspec/prophecy-phpunit"
115-
run: |
116-
cd ~/drupal
117-
COMPOSER_MEMORY_LIMIT=-1 composer require --dev phpspec/prophecy-phpunit:^2
118-
if: ${{ matrix.drupal == '^9.0' }}
95+
uses: bluehorndigital/[email protected]
96+
with:
97+
version: ${{ matrix.drupal }}
98+
path: ~/drupal
11999
- name: "require drupal-check"
120100
run: |
121101
cd ~/drupal

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^7.2.5|^8.0",
14-
"composer/xdebug-handler": "^2.0.1",
14+
"composer/xdebug-handler": "^1.1 | ^2.0.1",
1515
"jean85/pretty-package-versions": "^1.5.0 || ^2.0.1",
1616
"mglaman/phpstan-drupal": "^0.12.8",
1717
"nette/neon": "^3.1",

Diff for: composer.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/Command/CheckCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
129129
'parameters' => [
130130
'tipsOfTheDay' => false,
131131
'reportUnmatchedIgnoredErrors' => false,
132-
'excludes_analyse' => [
132+
'excludePaths' => [
133133
'*/tests/Drupal/Tests/Listeners/Legacy/*',
134134
'*/tests/fixtures/*.php',
135135
'*/settings*.php',
@@ -145,7 +145,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
145145
if (!empty($this->excludeDirectory)) {
146146
// There may be more than one path passed in, comma separated.
147147
$excluded_directories = explode(',', $this->excludeDirectory);
148-
$configuration_data['parameters']['excludes_analyse'] = array_merge($excluded_directories, $configuration_data['parameters']['excludes_analyse']);
148+
$configuration_data['parameters']['excludePaths'] = array_merge($excluded_directories, $configuration_data['parameters']['excludePaths']);
149149
}
150150

151151
if ($this->isAnalysisCheck) {

0 commit comments

Comments
 (0)