forked from sbpp/sourcebans-pp
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathphpstan.neon
More file actions
52 lines (50 loc) · 1.9 KB
/
phpstan.neon
File metadata and controls
52 lines (50 loc) · 1.9 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
48
49
50
51
52
includes:
- phpstan-baseline.neon
- includes/vendor/staabm/phpstan-dba/config/dba.neon
# #1273: catch the PHP 8.1 null-to-scalar deprecation surface (strlen,
# trim, substr, preg_match, mb_strlen, …) before it bites us on the
# PHP 9 bump. The matched phpVersion below is what flips the rules on.
- includes/vendor/phpstan/phpstan-deprecation-rules/rules.neon
parameters:
level: 5
phpVersion: 80500
bootstrapFiles:
- includes/vendor/autoload.php
- phpstan-bootstrap.php
- phpstan-dba-bootstrap.php
paths:
- .
excludePaths:
- includes/vendor/*
- includes/Auth/openid.php
- includes/tinymce/*
- cache/*
- templates_c/*
- tests/*
- phpstan/*
- phpstan-bootstrap.php
- phpstan-dba-bootstrap.php
services:
-
class: Sbpp\PHPStan\SmartyTemplateRule
arguments:
templatesDir: %currentWorkingDirectory%/themes/default
tags:
- phpstan.rules.rule
-
class: Sbpp\PHPStan\SbppSyntaxErrorInQueryMethodRule
tags: [phpstan.rules.rule]
arguments:
classMethods:
# The legacy `Database::query` is preserved as a class_alias
# shim (#1290 phase B); calls inside the codebase still
# resolve to it via PHPStan's reflection. New code should
# call `Sbpp\Db\Database::query` directly.
- 'Sbpp\Db\Database::query#0'
- 'Database::query#0'
# Hard-coded to match Database::__construct's dev/CI default
# (see docker-compose.yml DB_PREFIX=sb, .github/workflows/* and
# docker/db-init/00-render-schema.sh). Bump in lockstep if the
# convention ever changes — the reflector reads DBA_PREFIX from
# the env (see phpstan-dba-bootstrap.php) and must agree.
prefix: sb