From 70f0d8e0f7841c1be8963e7b3634063356f9502b Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:23:59 +0100 Subject: [PATCH] docs: align contributing guide with ci --- CONTRIBUTING.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7ae27e..57f7cb8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,19 +5,26 @@ Thanks for your interest in improving the PostHog PHP SDK. ## Development setup 1. Install [PHP](https://www.php.net/manual/en/install.php) and [Composer](https://getcomposer.org/download/). -2. Install dependencies: +2. Install dependencies using the same command CI uses: ```bash - php composer.phar update + composer install --prefer-dist --no-progress ``` -3. Run the test suite: +## CI-aligned checks - ```bash - bin/test - ``` +Run the test command used in CI: + +```bash +XDEBUG_MODE=coverage ./vendor/bin/phpunit --bootstrap vendor/autoload.php --configuration phpunit.xml --coverage-text +``` + +CI also runs PHP_CodeSniffer with `phpcs.xml`. You can run an equivalent local check with: - This script runs `./vendor/bin/phpunit --verbose test`. +```bash +curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar +php phpcs.phar --standard=phpcs.xml --extensions=php . +``` ## Pull requests