2017 © Pedro Peláez

library framework

The QueryPHP Framework.



The QueryPHP Framework.

  • Sunday, July 29, 2018
  • by hunzhiwange
  • Repository
  • 2 Watchers
  • 7 Stars
  • 104 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 1200 % Grown


, (*1)

Minimum PHP Version Minimum Swoole Version RoadRunner Version StyleCI QueryPHP Doc
Build Status Coverage Status Latest Stable Version QueryPHP License , (*2)

English | 中文 , (*3)

The QueryPHP Framework

This is the core framework code of QueryPHP application, starts from this moment with QueryPHP., (*4)

QueryPHP is a modern, high performance PHP progressive coroutine framework, we still focus on traditional PHP-FPM scenarios,with engineer user experience as its historical mission, let every PHP application have a good framework., (*5)

A hundred percent coverage of the unit tests to facing the bug,with commitment to creating high quality products for Level Level Leevel,with Swoole to open more possibilities in the future,now or in the future step by step. Our vision is USE LEEVEL WITH SWOOLE DO BETTER, let your business to support more user services., (*6)

The PHP Framework For Code Poem As Free As Wind, Starts From This Moment With QueryPHP., (*7)

, (*8)

QueryPHP was based on the DoYouHaoBaby framework which released 0.0.1 version at 2010.10.03,the latest version of DoYouHaoBaby is renamed as QeePHP., (*9)

The core packages

Why is QueryPHP?

We think the performance of PHP applications is very important and the development of pleasure also needs to be considered, and that's why we have developed the QueryPHP framework to achieve great ideals., (*10)

  • PHP 7 - We choose the lowest version of 7.4.0, because php7 has a unique advantage over the earlier version.
  • Swoole - Enable PHP developers to write high-performance, scalable, concurrent TCP, UDP, Unix socket, HTTP, Websocket services in PHP programming language.
  • Redis - QueryPHP encapsulation a cache component, including files, redis and so on, so as to reduce the pressure of database.
  • RoadRunner - RoadRunner is an open source high-performance PHP application server, load balancer and process manager. It supports running as a service with the ability to extend its functionality on a per-project basis.
Wow! Cool! Query Yet Simple!

How to install

composer require hunzhiwange/framework

The components that make up the QueryPHP framework

Components for the framework can be found on the Github website and Packagist website., (*11)

composer require leevel/di
composer require leevel/cache

... and more

Run Tests

_____________                           _______________
 ______/     \__  _____  ____  ______  / /_  _________
  ____/ __   / / / / _ \/ __`\/ / __ \/ __ \/ __ \___
   __/ / /  / /_/ /  __/ /  \  / /_/ / / / / /_/ /__
     \_\ \_/\____/\___/_/   / / .___/_/ /_/ .___/
        \_\                /_/_/         /_/

$cd /data/codes/queryphp/vendor/hunzhiwange/framework      
$composer install
$cp ./tests/config.php ./tests/config.local.php // Modify the config
$php vendor/bin/phinx migrate
- $php vendor/bin/phpunit tests
+ $php ./build/phpunit tests
+ $composer test
+ $composer test-coverage

Framework Command

$cd /data/codes/queryphp
$php leevel make:docwithin vendor/hunzhiwange/framework/tests
$php leevel make:idehelper Leevel\\Cache\\Proxy\\Cache
$php leevel make:idehelper:function vendor/hunzhiwange/framework/src/Leevel/Support/Arr

Unified Code Style

Install PHP Coding Standards Fixer

https://github.com/friendsofphp/php-cs-fixer, (*12)

It can be used without installation,we download a version for you., (*13)

Base use

$cd /data/codes/queryphp/vendor/hunzhiwange/framework
- $php-cs-fixer fix --config=.php_cs.dist
+ $php ./build/php-cs-fixer fix --config=.php_cs.dist
+ $composer php-cs-fixer

With Git hooks

Add a pre-commit for it., (*14)

cp ./build/pre-commit.sh ./.git/hooks/pre-commit
chmod 777 ./.git/hooks/pre-commit

Pass hook, (*15)

# git commit -h
# git commit -n -m 'pass hook' #bypass pre-commit and commit-msg hooks


- $php ./build/phpstan analyse
+ $composer phpstan

Travis CI Supported

Let code poem., (*16)

Official Documentation

Documentation for the framework can be found on the QueryPHP website., (*17)


Thanks my colleague John.mao for your selfless help in the development of this project and and let me have a new understanding, it makes QueryPHP more beautiful., (*18)

Thanks for these excellent projects, we have absorbed a lot of excellent design and ideas, standing on the shoulders of giants for innovation., (*19)


The QueryPHP framework is open-sourced software licensed under the MIT license., (*20)

The Versions