Skip to content

Commit 7608f41

Browse files
author
Matthias Leutenegger
committed
update readme for properties
1 parent d506675 commit 7608f41

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ composer require --dev syntro/silverstripe-phpstan
3737
* [Advanced Usage](docs/en/advanced-usage.md)
3838
* [License](LICENSE.md)
3939

40-
## Known Limitations
40+
## Known Limitations / Gotchas
4141

42+
* PHPStan checks if properties are actually initialized, read and written. This
43+
however does not apply to Silverstripes [configuration properties](https://docs.silverstripe.org/en/4/developer_guides/configuration/configuration/#configuration-properties).
44+
In order to tell PHPStan which of your properties are configuration values, you have
45+
to use the [`@config` docblock](https://docs.silverstripe.org/en/4/developer_guides/configuration/configuration/#configuration-properties).
4246
* The type of the `owner` property can't be reasoned about for extensions. You must use `getOwner()`. Related Issues: [#1043](https://github.com/phpstan/phpstan/issues/1043) and [#1044](https://github.com/phpstan/phpstan/issues/1044)
4347

4448
## Credits

docs/en/advanced-usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ parameters:
1111
# SS_List is basically ArrayList and DataList. Consider filter/sort/etc supported.
1212
- '#Call to an undefined method SS_List::#'
1313
includes:
14-
- vendor/symbiote/silverstripe-phpstan/extension.neon
14+
- vendor/syntro/silverstripe-phpstan/extension.neon
1515
```
1616

1717
# PHPUnit testing with a base SilverStripe project
@@ -26,12 +26,12 @@ NOTE: The '.' in the above command means it'll output the files in the current d
2626

2727
3) Execute the following from the project directory to run tests:
2828
```
29-
vendor/bin/phpunit -c vendor/syntro/silverstripe-phpstan/tests/phpunit.xml vendor/symbiote/silverstripe-phpstan/tests/
29+
vendor/bin/phpunit -c vendor/syntro/silverstripe-phpstan/tests/phpunit.xml vendor/syntro/silverstripe-phpstan/tests/
3030
```
3131

3232
# Debugging
3333

3434
By adding --debug to the list of parameters, you can make PHPStan crash when it hits an error.
3535
This is incredibly useful for PRs or helping raise issues.
3636

37-
`./vendor/bin/phpstan.phar.bat analyse ptv-mpw/src -c "phpstan.neon" -a "vendor/symbiote/silverstripe-phpstan/bootstrap.php" --level 2 --debug`
37+
`./vendor/bin/phpstan.phar.bat analyse ptv-mpw/src -c "phpstan.neon" -a "vendor/syntro/silverstripe-phpstan/bootstrap.php" --level 2 --debug`

docs/en/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ includes:
88

99
2. Execute from project dir:
1010
```
11-
vendor/bin/phpstan analyse app/src -c phpstan.neon -a vendor/symbiote/silverstripe-phpstan/bootstrap.php --level 4
11+
vendor/bin/phpstan analyse app/src -c phpstan.neon -a vendor/syntro/silverstripe-phpstan/bootstrap.php --level 4
1212
```
1313

1414
3. Visit the [PHPStan Github](https://github.com/phpstan/phpstan) for additional information. Try adjusting the `--level`, lower = less strict, higher = more strict.

0 commit comments

Comments
 (0)