Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration parameters excludes_analyse and excludePaths cannot be used at the same time. #239

Closed
dipakmdhrm opened this issue Jul 24, 2021 · 1 comment

Comments

@dipakmdhrm
Copy link

dipakmdhrm commented Jul 24, 2021

How is drupal-check installed?

drupal-check is installed as a dependency to my project

Environment:

  • OS: macOS
  • PHP Version: 7.4
  • Drupal core: 9.2.2
  • mglaman/drupal-check: 1.1.8
  • mglaman/phpstan-drupal: 0.12.11
  • phpstan/phpstan: 0.12.92

Describe the bug
I did a fresh drupal installation followed by composer require for drupal-check. Then I ran the command
vendor/bin/drupal-check web/modules/custom/
where web/modules/custom/ is an empty directory, just to check if drupal-check runs properly and I got the following error:

Configuration parameters excludes_analyse and excludePaths cannot be used at the same time.

Parameter excludes_analyse has been deprecated so use excludePaths only from now on.

Console output

Performing deprecation checks
Analyzing path: /Users/xxxx/Sites/xxx.yyy/web/modules/custom
Current working directory: /Users/xxxx/Sites/xxx.yyy
Using Drupal root: /Users/xxxx/Sites/xxx.yyy/web
Using vendor root: /Users/xxxx/Sites/xxx.yyy/vendor
Assumed running as global dependency
PHPStan path: /Users/xxxx/Sites/xxx.yyy/vendor/phpstan/phpstan/phpstan.phar
PHPStan configuration path: /private/var/folders/1p/3cfk6kqs3w50661vvjy7v9wc0000gp/T/drupal_check_phpstan_1627103050.neon
PHPStan configuration:
parameters:
  tipsOfTheDay: false
  reportUnmatchedIgnoredErrors: false
  excludes_analyse:
    - */tests/Drupal/Tests/Listeners/Legacy/*
    - */tests/fixtures/*.php
    - */settings*.php
    - */node_modules/*

  ignoreErrors:
    - "#\\Drupal calls should be avoided in classes, use dependency injection instead#"
    - "#Plugin definitions cannot be altered.#"
    - "#Missing cache backend declaration for performance.#"
    - "#Plugin manager has cache backend specified but does not declare cache tags.#"

  drupal:
    drupal_root: /Users/xxxx/Sites/xxx.yyy/web

  customRulesetUsed: true
  bootstrapFiles:
    - /Users/xxxx/Sites/xxx.yyy/vendor/mglaman/drupal-check/error-bootstrap.php

includes:
  - /Users/xxxx/Sites/xxx.yyy/vendor/phpstan/phpstan-deprecation-rules/rules.neon
  - /Users/xxxx/Sites/xxx.yyy/vendor/mglaman/phpstan-drupal/extension.neon


Executing PHPStan
Configuration parameters excludes_analyse and excludePaths cannot be used at the same time.

Parameter excludes_analyse has been deprecated so use excludePaths only from now on.

Finished executing PHPStan
Unlinking PHPStan configuration
Return PHPStan exit code
@dipakmdhrm
Copy link
Author

Update to ^1.1.9 fixes this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant