How to contribute

Contributions are easiest to review when they include a small reproduction, a focused change, and the relevant test command.


Set up the project

From the Socket Conveyor repository root:

1composer install

You need PHP 8.2 or newer and ext-openswoole 22.0 or newer.

Run checks

Run the full test suite:

1composer test

Run PHPUnit directly:

1vendor/bin/phpunit --testsuite All

Run static analysis:

1composer phpstan

Useful focused tests

Run the Pusher WebSocket feature tests:

1vendor/bin/phpunit tests/Feature/PusherWebSocketTest.php

Run the native message router unit tests:

1vendor/bin/phpunit tests/Unit/MessageRouterTest.php

Browser smoke test

For real pusher-js and Laravel Echo behavior:

1php examples/pusher-real/run-conveyor.php

In another terminal:

1php -S 127.0.0.1:8991 examples/pusher-real/router.php

Open:

1http://127.0.0.1:8991
2http://127.0.0.1:8991/echo.html

Check connection, public/private/presence subscriptions, toOthers(), and whispers before submitting protocol changes.

Documentation changes

When the package behavior changes, update both the package docs and this website. Keep examples short, runnable, and explicit about whether they apply to native Conveyor mode or Pusher/Reverb-compatible mode.