Skip to content

Commit 970e006

Browse files
committed
readme
1 parent 6902f4a commit 970e006

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,29 @@ final class SomeFixture extends AbstractFixture
10821082

10831083
## 3. Symfony-specific Rules
10841084

1085+
### NoGetDoctrineInControllerRule
1086+
1087+
Prevents using `$this->getDoctrine()` in controllers, to promote dependency injection.
1088+
1089+
```yaml
1090+
rules:
1091+
- Symplify\PHPStanRules\Rules\Symfony\NoGetDoctrineInControllerRule
1092+
```
1093+
1094+
<br>
1095+
1096+
### NoGetInControllerRule
1097+
1098+
Prevents using `$this->get(...)` in controllers, to promote dependency injection.
1099+
1100+
```yaml
1101+
rules:
1102+
- Symplify\PHPStanRules\Rules\Symfony\NoGetInControllerRule
1103+
```
1104+
1105+
<br>
1106+
1107+
10851108
### NoAbstractControllerConstructorRule
10861109

10871110
Abstract controller should not have constructor, as it can lead to tight coupling. Use @required annotation instead

0 commit comments

Comments
 (0)