File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,19 +5,26 @@ Thanks for your interest in improving the PostHog PHP SDK.
55## Development setup
66
771 . 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
You can’t perform that action at this time.
0 commit comments