Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
47 lines (47 loc) · 2.13 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
47 lines (47 loc) · 2.13 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
parameters:
level: 5
# One config serves Drupal 10 and 11, whose analysers report different
# things; an ignore that one of them never needs is not an error.
reportUnmatchedIgnoredErrors: false
paths:
- .
excludePaths:
- vendor (?)
# Drupal 11.2+ reads this install requirements class; PHPStan 1.x on
# Drupal 10 cannot ignore its unknown interface, so it is not analysed.
- src/Install
ignoreErrors:
# Form validation callbacks, hook classes and procedural hook shims run
# outside container injection.
- identifier: globalDrupalDependencyInjection.useDependencyInjection
-
message: '#\\Drupal calls should be avoided in classes#'
reportUnmatched: false
# The stock subscriber is registered only when Commerce Stock is installed.
-
message: '#Drupal\\commerce_stock_local\\#'
reportUnmatched: false
# Drupal 10 reads the entity annotations; the attributes are for 11.
-
message: '#Attribute class Drupal\\Core\\Entity\\Attribute\\ContentEntityType does not exist#'
reportUnmatched: false
# Commerce documents getEndDate() and getOriginal() as never null; both are
# null in practice (no end date; Drupal 10 has no getOriginal()).
- identifier: nullsafe.neverNull
- identifier: function.alreadyNarrowedType
- identifier: notIdentical.alwaysTrue
- identifier: instanceof.alwaysTrue
# Drupal 12 requires this attribute on kernel and functional tests; Drupal
# 10's PHPUnit 9 reads annotations and has no attribute classes.
-
message: '#Attribute class PHPUnit\\Framework\\Attributes\\RunTestsInSeparateProcesses does not exist#'
reportUnmatched: false
# Drupal 10 has neither hook attribute; they are only read on 11.1+, and
# LegacyRequirementsHook on 11.3+.
-
message: '#Attribute class Drupal\\Core\\Hook\\Attribute\\(Legacy)?(Requirements)?Hook does not exist#'
reportUnmatched: false
# DeprecationHelper calls getOriginal() only on Drupal 11.2+.
-
message: '#Call to an undefined method Drupal\\commerce_payment\\Entity\\PaymentInterface::getOriginal\(\)#'
reportUnmatched: false