-
Notifications
You must be signed in to change notification settings - Fork 21
/
phpstan-contrib.neon
32 lines (32 loc) · 2.27 KB
/
phpstan-contrib.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
parameters:
customRulesetUsed: true
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# Ignore phpstan-drupal extension's rules.
- '#\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.#'
# Ignore certain Symfony 4.3 deprecation errors not fixable in Drupal 8.x.
- '#.*extends deprecated class Symfony\\Component\\EventDispatcher\\Event.*#'
- '#.*Fetching class constant class of deprecated class Symfony\\Component\\EventDispatcher\\Event.*#'
- '#.*has typehint with deprecated (interface Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface|class Symfony\\[a-zA-Z0-9\\_]+\\Event).*#'
- '#Instantiation of deprecated class Symfony\\Component\\EventDispatcher\\Event.*#'
# Ignore certain PHPUnit 8 deprecation errors not fixable in Drupal 8.x.
- '#Call to deprecated method setMethods\(\) of class PHPUnit\\Framework\\MockObject\\MockBuilder.*#'
- '#Call to deprecated method expectExceptionMessageRegExp\(\) of class PHPUnit\\Framework\\TestCase.*#'
- '#Call to deprecated method readAttribute\(\) of class PHPUnit\\Framework\\Assert.*#'
# Ignore entitiy_embed cache tag warning (see https://www.drupal.org/project/entity_embed/issues/3087572#comment-13307163).
- '#config:entity_view_mode_list cache tag might be unclear and does not contain the cache key in it.#'
excludePaths:
# Exclude files with missing parent classes from optional module dependencies.
- */entity_reference_revisions/src/Plugin/diff/Field/EntityReferenceRevisionsFieldDiffBuilder.php
- */paragraphs/modules/paragraphs_library/tests/src/FunctionalJavascript/ParagraphsLibraryItemEntityBrowserTest.php
- */paragraphs/src/Feeds/*
# config_update source files in need of Drush 9+ update.
- */config_update/config_update_ui/src/Logger/ConfigUpdateUiDrush8Logger.php
- */config_update/config_update_ui/config_update_ui.drush_testing.inc
- */config_update/config_update_ui/src/Commands/ConfigUpdateUiCommands.php
includes:
- %currentWorkingDirectory%/vendor/mglaman/phpstan-drupal/extension.neon
- %currentWorkingDirectory%/vendor/phpstan/phpstan-deprecation-rules/rules.neon