-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrules-optional.neon
More file actions
42 lines (42 loc) · 1.65 KB
/
rules-optional.neon
File metadata and controls
42 lines (42 loc) · 1.65 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
# PHP-QA-CI Optional Rules
#
# These rules are NOT enabled by default. They are either opinionated or
# framework-specific. To enable them, copy the relevant lines into your
# project's phpstan.neon (e.g. qaConfig/phpstan.neon).
#
# OPINIONATED (any PHP project):
#
# - LTS\PHPQA\PHPStan\Rules\ForbidNullCoalescingEmptyStringRule
# - LTS\PHPQA\PHPStan\Rules\ForbidNullCoalescingFalseRule
#
# SYMFONY / DOCTRINE (framework-specific):
#
# - LTS\PHPQA\PHPStan\Rules\ForbidHeaderInjectionRule
# - LTS\PHPQA\PHPStan\Rules\ForbidRawSqlRule
#
# SYMFONY CONSOLE (convention enforcement):
#
# - LTS\PHPQA\PHPStan\Rules\RequireCronIntervalInDescriptionRule
#
# SYMFONY DI (explicit service declaration):
# Note: RequireExplicitDIAttributeRule has no constructor params.
#
# - LTS\PHPQA\PHPStan\Rules\RequireExplicitDIAttributeRule
#
# STRICT EXCEPTION HANDLING (catch blocks must use the exception):
# ForbidSilentCatchRule is stricter than ForbidEmptyCatchBlockRule (default).
# It flags catch blocks that have statements but ignore the caught exception.
#
# - LTS\PHPQA\PHPStan\Rules\ForbidSilentCatchRule
#
# INLINE PHPSTAN SUPPRESSION BAN (enforce fixing over suppressing):
# Bans @phpstan-ignore annotations. Forces type issues to be fixed properly
# instead of suppressed inline. Irreducible cases go in phpstan.neon ignoreErrors.
#
# - LTS\PHPQA\PHPStan\Rules\ForbidInlinePhpstanIgnoreRule
#
# READONLY SERVICES (enforce immutable services):
# Requires service classes to be "final readonly class". Skips entities,
# controllers, commands, and framework classes that need mutability.
#
# - LTS\PHPQA\PHPStan\Rules\RequireReadonlyServiceRule