Skip to content

Commit 0603950

Browse files
authored
docs: align contributing guide with CI checks (#124)
docs: align contributing guide with ci
1 parent cfdbca4 commit 0603950

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,26 @@ Thanks for your interest in improving the PostHog PHP SDK.
55
## Development setup
66

77
1. Install [PHP](https://www.php.net/manual/en/install.php) and [Composer](https://getcomposer.org/download/).
8-
2. Install dependencies:
8+
2. Install dependencies using the same command CI uses:
99

1010
```bash
11-
php composer.phar update
11+
composer install --prefer-dist --no-progress
1212
```
1313

14-
3. Run the test suite:
14+
## CI-aligned checks
1515

16-
```bash
17-
bin/test
18-
```
16+
Run the test command used in CI:
17+
18+
```bash
19+
XDEBUG_MODE=coverage ./vendor/bin/phpunit --bootstrap vendor/autoload.php --configuration phpunit.xml --coverage-text
20+
```
21+
22+
CI also runs PHP_CodeSniffer with `phpcs.xml`. You can run an equivalent local check with:
1923

20-
This script runs `./vendor/bin/phpunit --verbose test`.
24+
```bash
25+
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
26+
php phpcs.phar --standard=phpcs.xml --extensions=php .
27+
```
2128

2229
## Pull requests
2330

0 commit comments

Comments
 (0)