k-samuel/rr-service

RoadRunner Service

dev-main 2021-11-01 22:50 UTC

This package is auto-updated.

Last update: 2024-03-29 04:26:55 UTC


README

PHP Version Total Downloads Build and Test Codacy Badge

RoadRunner services (Beta Version)

Basic core for running high-performance services with PHP RoadRunner

Docs

Installation

// install PHP dependencies
composer create-project k-samuel/rr-service

// Get RoadRunner binary
./vendor/bin/rr get

// start Road Runner (default) 127.0.0.1:8083 DEV
./rr serve -d    

// start Road Runner (default) на 127.0.0.1:8083 PROD
./rr serve   

Setup only production dependencies

composer install --no-dev

Rebuild class map

composer dump-autoload -o

Tests

PHPStan

php ./vendor/bin/phpstan analyse src services tests

PHPUnit

php ./vendor/bin/phpunit

PHP CS

php ./vendor/bin/phpcs --standard=PSR12 ./src ./services ./tests/unit
php ./vendor/bin/phpcs --standard=Squiz --sniffs=Squiz.NamingConventions.ValidVariableName ./src ./services ./tests/unit

PHP CS Fixer

php ./vendor/bin/php-cs-fixer fix ./src

Example requests

http://127.0.0.1:8083/example/api

php console.php /worker