? hyperf releases NATs component and v1.1.5 version; enterprise level PHP micro service cloud native cooperation framework


Update content

This week’s update is mainly to add the hyperf / NATs component. NATs is an open-source, lightweight and high-performance cloud native message system. This component makes it possible for hyperf to interact with Nats. At the same time, it supports consul cluster as a service registry, and provides client support for redis cluster. At the same time, we also fix some components of ? bug, which makes the hyperf 1.1. * series more robust. It is released in version 1.1.5. It is recommended that users using 1.1 be newer.
Visit the official website hyperf.io or the document hyperf.wiki directly.

Newly added

  • #812 support that new planned tasks are only executed once under the cluster;
  • #820 new hyperf / NATs component;
  • #832 addedHyperf\Utils\Codec\JsonοΌ›
  • #833 addedHyperf\Utils\BackoffοΌ›
  • #852 isHyperf\Utils\ParallelNewly addedclear()Method to clean up all added callbacks;
  • #854 addedHyperf\GraphQL\GraphQLMiddlewareUsed to resolve graphql requests;
  • #859 added the support of consul cluster. Now you can pull the node information of service provider from consul cluster;
  • #873 add client support for redis cluster;


  • #831 repair the problem that the redis client connection will not automatically reconnect after the redis server is restarted;
  • #835 repairRequest::inputsThe default value parameter of the method is inconsistent with the expected effect;
  • #841 fixes the problem of invalid connection in case of multiple databases during database migration;
  • #844 fix the problem that the composer reader does not support the usage of the root namespace;
  • #846 repairing redis client’sscan, hScan, zScan, sScanProblems that cannot be used;
  • #850 fix the problem that the logger group does not work when the name is the same;


  • #832 optimizes the exception handling logic when the response object is converted to JSON format;
  • #840 use\Swoole\Timer::*To replaceswoole_timer_*Function;
  • #859 optimizes the logic of RPC client to obtain healthy node information from consul;

About hyperf

Hyperf is based onSwoole 4.4+The implementation of high-performance, high flexibility PHP cooperation framework, built-in cooperation server and a large number of commonly used components, performance based on traditionalPHP-FPMWhile providing ultra-high performance, our framework also maintains extremely flexible scalability. Standard components are implemented based on PSR standards, and based on strong dependency injection design, ensuring that most components or classes areReplaceableAndReusable.

In addition to the common collaborative version ofMySQL client、Redis clientIt also provides you with a collaborative version ofEloquent ORM、Websocket server and client、JSON RPC server and client、Grpc server and client、Opentracing (Zipkin, Jaeger) client、Guzzle HTTP client、Elasticsearch client、Consul client、Etcd client、AMQP component、Nats component、Apollo configuration center、Alicloud ACM application configuration management、Etcd configuration center、Current limiter based on token bucket algorithm、Universal connection pool、Fuse、Swagger document generation、Swoole Tracker、Blade and Smarty view engine、Snowflake global ID generatorAnd other components save the trouble of implementing the corresponding version.

Hyperf also providesDependency injection container based on psr-11、annotation、AOP aspect oriented programming、Middleware based on psr-15、Custom process、Event manager based on psr-14、Redis / rabbitmq message queue、Automatic model caching、Cache based on psr-16、Crontab second level scheduled task、I18N internationalization、Validation expression validationAnd other very convenient functions, to meet the rich technical and business scenarios, out of the box.

Original intention of framework

Although the framework based on PHP language development is in an era of a hundred flowers contending, we still can’t see a perfect framework with elegant design and ultra-high performance coexisting, nor a framework that really paves the way for PHP microservices. This is the original intention of hyperf and its team members. We will continue to invest in and make efforts for this, and welcome you to join us Source construction.

Design concept

Hyperspeed + Flexibility = HyperfFrom the name, we willSuper high speedandflexibilityAs a gene of hyperf.
Β  Β 

  • For ultra-high speed, we are based on the swoole process and make a lot of optimization in the framework design to ensure the output of ultra-high performance.
  • For flexibility, we are based on the powerful dependency injection component of hyperf, which is based on the contract of PSR standard and the contract implementation defined by hyperf, so that most of the components or classes in the framework are replaceable.

Based on the above characteristics, hyperf will have rich possibilities, such as the realization of single web services, API services, gateway services, distributed middleware, micro service architecture, game servers, Internet of things (IOT), etc.

Complete documentation

We have invested a lot of time in the construction of documents to solve various problems caused by the lack of documents. Documents also provide a large number of examples, which are also friendly to novices.
Hyperf official development document

Production available

We do a lot of unit tests for components to ensure the logic is correct. Currently, there are1163Single survey3427Four assertion conditions and high-quality documents have been maintained. Before hyperf officially opened to the outside world (June 20, 2019), it had passed the test of harsh production environment, and we officially opened the project to the outside world. Now many large Internet enterprises have deployed hyperf to their own production environment and operated stably.

Official website and communication

GitHub, point star support us
Gitee code cloud, point star support us
Hyperf official website
Hyperf document
QQ group: 862099724