Skip to content

Commit 7935f3c

Browse files
refactor: update PHPStan tmpDir config; move runtime directory to root; update docs. (#54)
1 parent 07ad8e5 commit 7935f3c

File tree

7 files changed

+19
-14
lines changed

7 files changed

+19
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Bug #51: Reorder Installation section in `README.md` for improved clarity (@terabytesoftw)
2222
- Bug #52: Standardize headings and improve clarity in documentation files (@terabytesoftw)
2323
- Bug #53: Update documentation for consistency and clarity; change section titles and add strict types declaration (@terabytesoftw)
24+
- Bug #54: Update `PHPStan` `tmpDir` config; move `runtime` directory to `root`; update docs (@terabytesoftw)
2425

2526
## 0.2.3 June 09, 2025
2627

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ parameters:
7979
- controllers
8080
- models
8181
82-
tmpDir: %currentWorkingDirectory%/tests/runtime
82+
tmpDir: %currentWorkingDirectory%/runtime
8383
8484
yii2:
8585
config_path: config/phpstan-config.php

docs/configuration.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This guide covers all configuration options for the Yii2 PHPStan extension, from basic setup to advanced scenarios.
5+
This guide covers all configuration options for the Yii PHPStan extension, from basic setup to advanced scenarios.
66

77
## Basic configuration
88

@@ -18,7 +18,7 @@ parameters:
1818
paths:
1919
- src
2020
21-
tmpDir: %currentWorkingDirectory%/tests/runtime
21+
tmpDir: %currentWorkingDirectory%/runtime
2222
2323
yii2:
2424
config_path: config/phpstan-config.php
@@ -48,7 +48,7 @@ parameters:
4848
- widgets
4949
- components
5050
51-
tmpDir: %currentWorkingDirectory%/tests/runtime
51+
tmpDir: %currentWorkingDirectory%/runtime
5252
5353
yii2:
5454
config_path: config/phpstan-config.php
@@ -107,7 +107,7 @@ parameters:
107107
- commands
108108
- console
109109
110-
tmpDir: %currentWorkingDirectory%/tests/runtime
110+
tmpDir: %currentWorkingDirectory%/runtime
111111
112112
yii2:
113113
config_path: config/phpstan-console-config.php
@@ -117,7 +117,7 @@ parameters:
117117

118118
### Default constants
119119

120-
The extension automatically recognizes these Yii2 constants:
120+
The extension automatically recognizes these Yii constants:
121121

122122
```neon
123123
parameters:
@@ -131,7 +131,7 @@ parameters:
131131

132132
### Adding custom constants
133133

134-
⚠️ **Important**: When you define `dynamicConstantNames`, it **replaces** the defaults. Include Yii2 constants explicitly.
134+
⚠️ **Important**: When you define `dynamicConstantNames`, it **replaces** the defaults. Include Yii constants explicitly.
135135

136136
```neon
137137
parameters:
@@ -318,7 +318,7 @@ parameters:
318318
- widgets
319319
- components
320320
321-
tmpDir: %currentWorkingDirectory%/tests/runtime
321+
tmpDir: %currentWorkingDirectory%/runtime
322322
323323
yii2:
324324
config_path: config/phpstan-config.php
@@ -355,7 +355,7 @@ parameters:
355355
minimumNumberOfJobsPerProcess: 2
356356
357357
# Memory management
358-
tmpDir: %currentWorkingDirectory%/tests/runtime
358+
tmpDir: %currentWorkingDirectory%/runtime
359359
```
360360

361361
Optimized bootstrap file.
@@ -408,7 +408,7 @@ includes:
408408
parameters:
409409
level: 6
410410
411-
tmpDir: %currentWorkingDirectory%/tests/runtime
411+
tmpDir: %currentWorkingDirectory%/runtime
412412
```
413413

414414
### Web configuration

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ parameters:
8989
- controllers
9090
- models
9191
92-
tmpDir: %currentWorkingDirectory%/tests/runtime
92+
tmpDir: %currentWorkingDirectory%/runtime
9393
9494
yii2:
9595
config_path: config/phpstan-config.php

phpstan-console.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ parameters:
1717
- src
1818
- tests/console
1919

20-
tmpDir: %currentWorkingDirectory%/tests/runtime
20+
tmpDir: %currentWorkingDirectory%/runtime
2121

2222
yii2:
2323
config_path: tests/config/phpstan-console-config.php

phpstan.neon

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ parameters:
77
bootstrapFiles:
88
- tests/bootstrap.php
99

10+
excludePaths:
11+
analyse:
12+
- tests/console/
13+
1014
ignoreErrors:
1115
- '#Calling PHPStan\\Reflection\\Annotations\\AnnotationsPropertiesClassReflectionExtension\:\:(has|get)Property\(\) is not covered.+#'
1216
- '#Creating new PHPStan\\Reflection\\Dummy\\DummyPropertyReflection is not covered.+#'
@@ -15,9 +19,9 @@ parameters:
1519

1620
paths:
1721
- src
18-
- tests/web
22+
- tests
1923

20-
tmpDir: %currentWorkingDirectory%/tests/runtime
24+
tmpDir: %currentWorkingDirectory%/runtime
2125

2226
yii2:
2327
config_path: tests/config/phpstan-config.php
File renamed without changes.

0 commit comments

Comments
 (0)