|
3 | 3 | [](https://github.com/BookStackApp/BookStack/releases/latest) |
4 | 4 | [](https://github.com/BookStackApp/BookStack/blob/development/LICENSE) |
5 | 5 | [](https://crowdin.com/project/bookstack) |
6 | | -[](https://github.com/BookStackApp/BookStack/actions) |
7 | | -[](https://github.styleci.io/repos/41589337) |
| 6 | +[](https://github.com/BookStackApp/BookStack/actions) |
| 7 | +[](https://github.com/BookStackApp/BookStack/actions) |
8 | 8 | [](https://codeclimate.com/github/BookStackApp/BookStack/maintainability) |
9 | 9 |
|
10 | 10 | [](https://gh-stats.bookstackapp.com/) |
@@ -115,12 +115,29 @@ php artisan migrate --database=mysql_testing |
115 | 115 | php artisan db:seed --class=DummyContentSeeder --database=mysql_testing |
116 | 116 | ``` |
117 | 117 |
|
118 | | -Once done you can run `php vendor/bin/phpunit` in the application root directory to run all tests. |
| 118 | +Once done you can run `composer test` in the application root directory to run all tests. |
119 | 119 |
|
120 | 120 | ### 📜 Code Standards |
121 | 121 |
|
122 | | -PHP code style is enforced automatically [using StyleCI](https://github.styleci.io/repos/41589337). |
123 | | -If submitting a PR, any formatting changes to be made will be automatically fixed after merging. |
| 122 | +PHP code standards are managed by [using PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer). |
| 123 | +Static analysis is in place using [PHPStan](https://phpstan.org/) & [Larastan](https://github.com/nunomaduro/larastan). |
| 124 | +The below commands can be used to utilise these tools: |
| 125 | + |
| 126 | +```bash |
| 127 | +# Run code linting using PHP_CodeSniffer |
| 128 | +composer lint |
| 129 | + |
| 130 | +# As above, but show rule names in output |
| 131 | +composer lint -- -s |
| 132 | + |
| 133 | +# Auto-fix formatting & lint issues via PHP_CodeSniffer phpcbf |
| 134 | +composer format |
| 135 | + |
| 136 | +# Run static analysis via larastan/phpstan |
| 137 | +composer check-static |
| 138 | +``` |
| 139 | + |
| 140 | +If submitting a PR, formatting as per our project standards would help for clarity but don't worry too much about using/understanding these tools as we can always address issues at a later stage when they're picked up by our automated tools. |
124 | 141 |
|
125 | 142 | ### 🐋 Development using Docker |
126 | 143 |
|
@@ -234,9 +251,9 @@ Note: This is not an exhaustive list of all libraries and projects that would be |
234 | 251 | * [OneLogin's SAML PHP Toolkit](https://github.com/onelogin/php-saml) - _[MIT](https://github.com/onelogin/php-saml/blob/master/LICENSE)_ |
235 | 252 | * [League/CommonMark](https://commonmark.thephpleague.com/) - _[BSD-3-Clause](https://github.com/thephpleague/commonmark/blob/2.2/LICENSE)_ |
236 | 253 | * [League/Flysystem](https://flysystem.thephpleague.com) - _[MIT](https://github.com/thephpleague/flysystem/blob/3.x/LICENSE)_ |
237 | | -* [StyleCI](https://styleci.io/) - _Hosted Service_ |
238 | 254 | * [pragmarx/google2fa](https://github.com/antonioribeiro/google2fa) - _[MIT](https://github.com/antonioribeiro/google2fa/blob/8.x/LICENSE.md)_ |
239 | 255 | * [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode) - _[BSD-2-Clause](https://github.com/Bacon/BaconQrCode/blob/master/LICENSE)_ |
240 | 256 | * [phpseclib](https://github.com/phpseclib/phpseclib) - _[MIT](https://github.com/phpseclib/phpseclib/blob/master/LICENSE)_ |
241 | 257 | * [Clockwork](https://github.com/itsgoingd/clockwork) - _[MIT](https://github.com/itsgoingd/clockwork/blob/master/LICENSE)_ |
242 | 258 | * [PHPStan](https://phpstan.org/) & [Larastan](https://github.com/nunomaduro/larastan) - _[MIT](https://github.com/phpstan/phpstan/blob/master/LICENSE) and [MIT](https://github.com/nunomaduro/larastan/blob/master/LICENSE.md)_ |
| 259 | +* [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) - _[BSD 3-Clause](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt)_ |
0 commit comments