Skip to content
☕️ 🚀 tiny & fast PHP framework for building Microservices/RESTful APIs, with useful features: IOC, Hook, ORM, RPC, Swagger, Annotation, Parameters binding, Validation, etc.
Branch: master
Clone or download
caoym Merge pull request #26 from jiangslee/patch-1
Latest commit 26915d6 Oct 16, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs 纠正:“RPC”写成了"PRC" Oct 12, 2018
src Add files via upload Aug 15, 2018
tests fixed validator rule `in` Jun 27, 2018
.coveralls.yml coveralls Jul 31, 2017
.gitignore GitBook API Example Sep 17, 2016
LICENSE add license Dec 20, 2015
composer.json fix php7.1 required Aug 29, 2018
phpunit.xml coveralls Jul 31, 2017


GitHub license Package version Documentation Status Build Status Scrutinizer Code Quality Code Coverage

phprs-restful 2.x is renamed to PhpBoot, and incompatible with 1.x. You can get the old version from phprs-restful v1.x


PhpBoot is an easy and powerful PHP framework for building RESTful/Microservices APIs.


PhpBoot provides mainstream features, such as IOC, HOOK, ORM, Validation, etc. But the most striking features are:

1. Designing object-oriented APIs


class BookController
    public function findBooks(Request $request)
        $name = $request->get('name');
        $offset = $request->get('offset', 0);
        $limit = $request->get('limit', 10);
        return new Response(['total'=>$total, 'data'=>$books]);
    public function createBook(Request $request)

WITH PhpBoot:

 * @path /books/
class Books
     * @route GET /
     * @return Book[]
    public function findBooks($name, &$total=null, $offset=0, $limit=10)
        $total = ...
        return $books;
     * @route POST /
     * @param Book $book {@bind request.request} bind $book with http body
     * @return string id of created book
    public function createBook(Book $book)
        $id = ... 
        return $id;

Read more: phpboot-example。    

2. Swagger

PhpBoot can automatically generate Swagger JSON,which can be rendered as document by Swagger UI like this:

Read more: Online Demo

3. RPC

Call the remote Books with RPC:

$books = $app->make(RpcProxy::class, [

Concurrent call RPC:

$res = MultiRpc::run([
        return $service1->doSomething();
        return $service2->doSomething();

Read more: RPC

4. IDE friendly



  1. Install composer

    curl -s | php
  2. Install PhpBoot

    composer require "caoym/phpboot"
  3. index.php

    require __DIR__.'/vendor/autoload.php';
    $app = \PhpBoot\Application::createByDefault(__DIR__.'/config/config.php');

Help & Documentation

You can’t perform that action at this time.