awesome-skeleton-roadrunner

🚧 4.0 版即将推出! 用于在 PHP 7.4 以上(包括P HP 8)的现代开发的强大骨架。包含经过质量测试的包,周到的结构和你开发微服务所需的一切。「🚧 Version 4.0 coming soon! Awesome Skeleton for modern development on PHP 7.4+ (incl. PHP 8). Contains quality tested packages, thoughtful structure and everything you need to develop microservices.」

Github星跟踪图

Awesome Skeleton for modern development on PHP 7.4+ (incl. PHP 8)

Contains quality tested packages, thoughtful structure and everything you need to develop microservices.

Build Status
Code Coverage
Scrutinizer Code Quality
Total Downloads
Latest Stable Version
License


Installation

composer create-project 'sunrise/awesome-skeleton:^3.0' app

Cooking

Set up your database connection:

cp .env.example .env && nano .env

Execute a migration:

php bin/app migrations:migrate --service 'master' --no-interaction

Run CLI

incl.: Doctrine DBAL, Doctrine ORM, Doctrine Migrations.

php bin/app

Run via PHP

listen 0.0.0.0:3000

composer serve

Run via RoadRunner

listen 0.0.0.0:3000

Set up your server:

cp .rr.yml.example .rr.yml && nano .rr.yml

Run the server:

rr -dv serve

Run via Swoole

Coming soon...

Run tests

composer test

Run benchmarks

composer bench

Run routes through cURL

you may need to change the server address...

Home (index)

curl -X 'GET' 'http://127.0.0.1:3000/'

OpenAPI document

curl -X 'GET' 'http://127.0.0.1:3000/openapi'

Create an entry (example bundle)

curl -X 'POST' -H 'Content-Type: application/json' -d '{"name": "foo", "slug": "foo"}' 'http://127.0.0.1:3000/api/v1/entry'

Update an existing entry (example bundle)

you need to set an existing ID.

curl -X 'PATCH' -H 'Content-Type: application/json' -d '{"name": "foo", "slug": "foo"}' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'

Delete an existing entry (example bundle)

you need to set an existing ID.

curl -X 'DELETE' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'

Read an existing entry (example bundle)

you need to set an existing ID.

curl -X 'GET' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'

List of entries (example bundle)

curl -X 'GET' 'http://127.0.0.1:3000/api/v1/entry'

Useful commands

Deploy

bash bin/deploy

Down

bash bin/down 'Reason...'

Up

bash bin/up

Generate Systemd unit for RoadRunner

php bin/app app:roadrunner:generate-systemd-unit > app.service

Generate OpenApi document

php bin/app app:openapi:generate-document > openapi.json

Used stack

see composer.json

Used technology

RoadRunner

OpenApi (Swagger) specification

Json Schema specification


It may be useful to you

Awesome middlewares for your application


with :heart: for you

主要指标

概览
名称与所有者sunrise-php/awesome-skeleton
主编程语言PHP
编程语言PHP (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2019-01-04 05:45:06
推送于2025-03-10 14:40:23
最后一次提交2025-03-10 15:38:37
发布数5
最新版本名称v4.0.0 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数90
关注者数7
派生数3
提交数176
已启用问题?
问题数3
打开的问题数0
拉请求数9
打开的拉请求数0
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?