Development
Nexus uses Docker for development to ensure a consistent environment across all contributors. The project includes a Makefile with targets for all common operations.
Docker setup
make build # Build Docker images
make up # Start containers
make install # Run composer install inside the PHP container
To stop the containers:
make down
To open a shell inside the PHP container:
make shell
Running tests
All tests use PHPUnit 11. The test suites are organized by package and runtime:
make test # Run all tests
make test-unit # Unit tests only
make test-fiber # Fiber runtime integration tests
make test-swoole # Swoole runtime integration tests (uses php-swoole container)
make test-serialization # Serialization integration tests
The Swoole tests run in a separate php-swoole Docker container that has the
Swoole extension installed.
Static analysis
Nexus targets Psalm Level 1 (strictest):
make psalm
Code style
The project uses PHP_CodeSniffer and PHP-CS-Fixer:
make phpcs # Check for coding standard violations
make phpcbf # Automatically fix PHPCS violations
make cs # Check code style with PHP-CS-Fixer (dry run)
make cs-fix # Fix code style with PHP-CS-Fixer