Repository navigation
Expand file tree
/
Copy pathphpstan.neon
More file actions
71 lines (69 loc) · 2.88 KB
/
Copy pathphpstan.neon
File metadata and controls
71 lines (69 loc) · 2.88 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
includes:
- vendor/phpstan/phpstan-doctrine/extension.neon
- vendor/phpstan/phpstan-doctrine/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-symfony/rules.neon
- ./vendor/yamadashy/phpstan-friendly-formatter/extension.neon
- vendor/spaze/phpstan-disallowed-calls/extension.neon
- phpstan-baseline.neon
parameters:
level: 10
disallowedFunctionCalls:
-
function: 'exec()'
message: 'for security reasons. Use Symfony Process component instead.'
-
function: 'eval()'
message: 'for security reasons.'
-
function: 'system()'
message: 'for security reasons.'
-
function: 'passthru()'
message: 'for security reasons.'
-
function: 'shell_exec()'
message: 'for security reasons.'
-
function: 'phpinfo()'
message: 'for security reasons.'
-
function: 'popen()'
message: 'is risky. Ensure you are handling the process handle correctly.'
-
function: 'md5()'
message: 'md5 is cryptographically broken. Use hash() with a strong algorithm, or password_hash() for passwords.'
-
function: 'sha1()'
message: 'sha1 is cryptographically broken. Use hash() with a strong algorithm, or password_hash() for passwords.'
-
function: 'assert()'
message: 'assert() can evaluate a string as PHP code. Avoid it for security reasons.'
-
function: 'error_reporting()'
message: 'configure error reporting through the environment, not at runtime.'
-
function: 'ini_set()'
message: 'configure PHP through php.ini / the environment, not at runtime.'
doctrine:
allowNullablePropertyForRequiredField: true
friendly:
lineBefore: 0 # Number of lines to display before error line (default: 2)
lineAfter: 0 # Number of lines to display after error line (default: 2)
errorFormat: friendly
reportUnmatchedIgnoredErrors: true
symfony:
containerXmlPath: var/cache/dev/Smart_SonataBundle_KernelDevDebugContainer.xml
ignoreErrors:
# method.nonObject ignoré dans tests/ : les fixtures initialisent des objets partiels
# dont certaines methodes peuvent retourner null avant d'etre completement renseignes.
#-
# identifier: method.nonObject
# path: tests/
# https://github.com/symfony/symfony/issues/36202#issuecomment-769226149
bootstrapFiles:
- vendor/bin/.phpunit/phpunit/vendor/autoload.php
# Temporary directory where PHPStan stores its cache and working files during analysis.
tmpDir: var/cache/phpstan