Migrated repository
Go to file
2021-06-27 10:05:46 +08:00
.github Added ci for php8 (#3661) 2021-06-18 18:29:57 +08:00
.travis Don't retry, when recv timeout for json-rpc client. (#3195) 2021-01-25 11:48:00 +08:00
bin Added ide-helper component (#3714) 2021-06-20 10:18:28 +08:00
docs Added document about how to use custom driver for service governance. 2021-06-26 09:54:06 +08:00
src Format code 2021-06-27 10:05:46 +08:00
.gitignore Upgrade phpunit to 9.4 (#2617) 2020-10-10 01:06:25 +08:00
.php-cs-fixer.php Upgrade friendsofphp/php-cs-fixer to ^3.0 (#3566) 2021-05-11 12:18:49 +08:00
.travis.yml Added test case for checking refcount for aop pipeline. (#3088) 2021-01-08 15:06:04 +08:00
bootstrap.php Format code. (#2122) 2020-07-15 17:05:45 +08:00
CHANGELOG-2.0.md Fix typo (#3282) 2021-02-19 19:18:45 +08:00
CHANGELOG-2.1.md Fixed the wrong judgment of counter or duration for circuit breaker. (#3684) 2021-06-07 20:00:41 +08:00
CHANGELOG-2.2.md Added document about how to use custom driver for service governance. 2021-06-26 09:54:06 +08:00
CHANGELOG.md Added test case. 2020-06-16 15:58:06 +08:00
composer.json Added document about how to use config center 2021-06-25 10:04:45 +08:00
LICENSE Update LICENSE 2019-10-07 10:01:51 +08:00
licenses.md Update licenses.md 2020-01-19 00:23:05 +08:00
phpstan.neon Removed config zookeeper.php, please use config_center.php instead. (#3733) 2021-06-24 11:23:29 +08:00
phpunit.xml Added test cases for config center. 2021-06-25 15:18:48 +08:00
README-CN.md Removed deprecated code. (#2648) 2020-10-13 10:30:14 +08:00
README.md Fixed ci 2020-11-09 18:41:21 +08:00

English | 中文

Hyperf Logo

Stable Version Php Version Swoole Version Hyperf License

PHPUnit for Hyperf Build Status Total Downloads Monthly Downloads

Introductions

Hyperf is an extremely performant and flexible PHP CLI framework based on Swoole 4.5+, powered by the state-of-the-art coroutine server and a large number of battle-tested components. Aside from the decisive benchmark outmatching against PHP-FPM frameworks, Hyperf also distinct itself by its focus on flexibility and composability. Hyperf ships with an AOP-enabling dependency injector to ensure components and classes are pluggable and meta programmable. All of its core components strictly follow the PSR standards and thus can be used in other frameworks.

Hyperf's architecture is built upon the combination of Coroutine, Dependency injection, Events, Annotation, AOP (aspect-oriented programming). Core components provided by Hyperf can be used out of the box in coroutine context. The set includes but not limited to: MySQL coroutine client, Redis coroutine client, WebSocket server and client, JSON RPC server and client, gRPC server and client, Zipkin/Jaeger (OpenTracing) client, Guzzle HTTP client, Elasticsearch client, Consul client, ETCD client, AMQP component, Apollo configuration center, Aliyun ACM, ETCD configuration center, Token bucket algorithm-based limiter, Universal connection pool, Circuit breaker, Swagger, Swoole Tracker, Snowflake, Simply Redis MQ, RabbitMQ, NSQ, Nats, Seconds level crontab, Custom Processes, etc. Be assured Hyperf is still a PHP framework. You will also find familiar packages such as Middleware, Event Manager, Coroutine optimized Eloquent ORM (And Model Cache!), Translation, Validation, View engine (Blade/Smarty/Twig/Plates/ThinkTemplate) and more at your command.

Origin

Many new PHP frameworks had emerged over the years, yet we were still waiting for one that unites the ultra-performance and elegant design, as well as paving the way for PHP microservice. Hence Hyperf was born to be the pioneer. With this vision in mind, we will continue to invest in it, and you are welcome to join us to participate in open source development.

Design Goals

Hyperspeed + Flexibility = Hyperf. The equation hidden in the name exhibits Hyperf's genetic ambition.

Hyperspeed: Leveraging Swoole coroutine, Hyperf is capable of handling massive traffic. Hyperf team made many optimizations throughout the framework to eliminate every obstacle between the end-user and the roaring engine.

Flexibility: Hyperf believes its Dependency Injection component is best in class. With the help of Hyperf DI, components and class are all pluggable and meta programmable. On the other hand, All Hyperf components are mean to be shared interchangeably with the world, as they all follow PSR or open contracts.

Thanks to these metrits, Hyperf has enabled untapped potential in many areas, such as implementing Web servers, gateway servers, distributed middleware software, microservices architecture, game servers, and Internet of Things (IoT).

Documentation

https://hyperf.wiki

Security Vulnerabilities

If you discover a security vulnerability within Hyperf, please send an e-mail to Hyperf Team via group@hyperf.io. All security vulnerabilities will be promptly addressed.

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Support this project with your organization or company. Your logo will show up here with a link to your website. [Contribute]

Performance

Aliyun 8 cores 16G ram

command: wrk -c 1024 -t 8 http://127.0.0.1:9501/

Running 10s test @ http://127.0.0.1:9501/
  8 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdevs
    Latency    10.08ms    6.82ms  56.66ms   70.19%
    Req/Sec    13.17k     5.94k   33.06k    84.12%
  1049478 requests in 10.10s, 190.16MB read
Requests/sec: 103921.49
Transfer/sec:     18.83MB

The Hyperf Ecosystem

  • 🧬 Nano is a zero-config, no skeleton, minimal Hyperf distribution that allows you to quickly build a Hyperf application with just a single PHP file.
  • GoTask is a library to spawns a go process as a Swoole sidecar and establishes a bi-directional IPC to offload heavy-duties to Go. Think of it as a Swoole Taskworker in Go.
  • 🚀 Jet is a unification model RPC Client, built-in JSONRPC protocol, available to running in ALL PHP environments, including PHP-FPM and Swoole/Hyperf environments.

License

The Hyperf framework is open-source software licensed under the MIT license.