Migrated repository
Go to file
2023-09-15 14:33:56 +08:00
.github Fixed bug that validateJson was incompatibility with php 8.0 (#6146) 2023-09-14 15:24:32 +08:00
.travis Throw exception (executing sql failed) when used clickhouse for hyperf/db. (#5886) 2023-06-28 10:35:27 +08:00
bin Fix the bug that cannot work in vscode extensions (#5779) 2023-06-01 16:26:57 +08:00
docs Release v3.0.36 (#6152) 2023-09-15 14:33:56 +08:00
src Optimized FailToConsume event for hyperf/kafka (#6151) 2023-09-15 14:06:19 +08:00
.gitignore Support Swow for hyperf/metric (#5292) 2023-01-06 15:51:18 +08:00
.php-cs-fixer.php Use Hyperf\Collection\Collection instead of Hyperf\Utils\Collection. (#5593) 2023-04-01 15:19:29 +08:00
.phpstorm.meta.php Adds some functions to hyperf/support (#5672) 2023-04-25 17:04:00 +08:00
.travis.yml Added test case for checking refcount for aop pipeline. (#3088) 2021-01-08 15:06:04 +08:00
bootstrap.php Merge branch 'master' into 3.0-merge 2021-12-10 17:14:34 +08:00
CHANGELOG-2.0.md Fix typo (#3282) 2021-02-19 19:18:45 +08:00
CHANGELOG-2.1.md Release v2.1.23 (#3803) 2021-07-12 09:13:04 +08:00
CHANGELOG-2.2.md Fixed bug that cannot stop server by Ctrl C. (#5062) 2022-08-27 15:28:56 +08:00
CHANGELOG-3.0.md Release v3.0.36 (#6152) 2023-09-15 14:33:56 +08:00
CHANGELOG.md Added test case. 2020-06-16 15:58:06 +08:00
composer.json Update php-cs-fixer to version ~3.16.0 (#5755) 2023-05-23 11:47:07 +08:00
CONTRIBUTING.md Translating the introduction section (About, Communication, Donate, Contribute), update the README.md to match the new About section, adding a CONTRIBUTING.md file to match the contribute section (#4105) 2021-09-29 11:54:56 +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 Optimized code for phpstan.neon 2023-05-17 13:55:36 +08:00
phpunit.xml Added code about http2 client. 2023-03-17 17:03:52 +08:00
README-CN.md Update README-CN.md 2022-08-09 11:34:39 +08:00
README.md Update 2023-01-03 06:37:37 +08:00
rector.php Upgrade the minimum php version to 8.0 for resource. (#4407) 2021-12-29 11:21:02 +08:00

English | 中文

Hyperf Logo

Stable Version Php Version Swoole Version Hyperf License

PHPUnit for Hyperf Total Downloads Monthly Downloads

Introduction

Hyperf is an extremely performant and flexible PHP CLI framework, powered by a state-of-the-art coroutine server and a large number of battle-tested components. Aside from decisively beating PHP-FPM frameworks in benchmarks, Hyperf is unique in its focus on flexibility and composition. Hyperf ships with an AOP-enabling (aspect-oriented programming) dependency injector to ensure components and classes are pluggable and meta-programmable. All of Hyperf's core components strictly follow PSR standards and can be used in other frameworks.

Hyperf's architecture is built using a combination of Coroutines, Dependency injection, Events, Annotations, and AOP. In addition to providing MySQL, Redis and other common coroutine clients, Hyperf also provides coroutine compatible versions of WebSocket server / client, JSON RPC server / client, gRPC server / 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. Therefore, developers can entirely avoid implementing coroutine compatible versions of these libraries.

Rest assured, Hyperf is still a PHP framework. Hyperf provides all the packages you expect: Middleware, Event Manager, Coroutine-optimized Eloquent ORM (and Model Cache!), Translation, Validation, View engine (Blade/Smarty/Twig/Plates/ThinkTemplate) and more.

Origin

Although there are many new PHP frameworks, we still haven't found a framework that matches an elegant design with ultra-high performance, nor have we found a framework that paves the way for PHP microservices. With this vision in mind, we will continue to invest in the future of this framework, and you are welcome to join us in contributing to the open-source development of Hyperf.

Design Goals

Hyperspeed + Flexibility = Hyperf. The equation hidden in our name exhibits Hyperf's founding ambition.

Hyperspeed: Leveraging Swoole and Swow coroutines, Hyperf is capable of handling massive amounts of traffic. The Hyperf team made many optimizations to the framework to eliminate every bottleneck between the end-user and our blazing engine.

Flexibility: We believe our Dependency Injection component is best in class. With the help of Hyperf DI, components and classes are all pluggable and meta-programmable. Inversely, all Hyperf components are meant to be shared with the world. Our commitment to PSR standards means that you can use Hyperf components in any compatible framework.

Via these traits, Hyperf has discovered the untapped potential in many fields: implementing Web servers, gateway servers, distributed middleware software, microservices architecture, game servers, and Internet-of-Things (IoT).

Production ready

Alongside our well-maintained, multilingual documentation, a large number of unit tests for each component ensure logical correctness. Before Hyperf was released to the public (2019-06-20), it had been privately used by some medium and large Internet companies for multiple services, which have been running without incident for years in harsh production environments.

Documentation

https://hyperf.wiki

Security Vulnerabilities

If you discover a security vulnerability within Hyperf, please send an e-mail to the 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].

Code Contributor over time

Code Contributor over time

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.
  • 🧰 Box is committed to helping improve the programming experience of Hyperf applications, managing the PHP environment and related dependencies, providing the ability to package Hyperf applications as binary programs, and also providing reverse proxy services for managing and deploying Hyperf applications.

Stargazers over time

Stargazers over time

License

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