Hyperf releases lightweight directed acyclic graph task choreography library, reverse Polish representation incubation component and v2.1.4 version


Update content

This week’s major newLightweight directed acyclic graph task scheduling LibraryandInverse Polish representationTwo incubation projects, and fixed bugs of some components, continue to improve the stability of hyperf, released on2.1.4Version.

It is recommended that you update this version with the following command.

composer update "hyperf/*" -o

Direct access to the official websitehyperf.ioOr documenthyperf.wikiView updates


  • #3165Repair methodHyperf\Database\Schema\MySqlBuilder::getColumnListingstayMySQL 8.0Version is not working properly.
  • #3174repairhyperf/databaseIn componentwhereStatement because of the code is not rigorous, resulting in bound parameters will be malicious replacement problem.
  • #3179repairjson-rpcDue to the end-to-end service restart, the client receives abnormal data all the time.
  • #3189repairkafkaIt can not be used normally in cluster mode.
  • #3191repairjson-rpcDue to the end-to-end service restart of the client, all the connections in the connection pool are invalid. When a new request comes in, the first use will report an error.

newly added

  • #3170byhyperf/watcherComponent added a more friendly driveFindNewerDriver, supportMac LinuxandDocker
  • #3195byJsonRpcPoolTransporterA new retrial mechanism is added. When the connection, contract and packet receiving fail, it will be retried twice by default, and the packet receiving timeout will not be retried.


  • #3169OptimizedErrorExceptionHandlerZhongyuset_error_handlerThe related input parameter code solves the problem of static detection error caused by input parameter mismatch.
  • #3191Optimizedhyperf/json-rpcComponent, when the connection is broken, it will try to reconnect first.


  • #3174Strict inspectionhyperf/databaseIn componentwhereStatement binding parameters.

New component incubation

  • DAGLightweight directed acyclic graph task choreography library.
  • RPNInverse Polish representation.

About hyperf

Hyperf is based onSwoole 4.5+The PHP coroutine framework with high performance and high flexibility, built-in coroutine server and a large number of commonly used components, has better performance than the traditional onePHP-FPMThe standard components are based onPSR standardImplementation, based on powerful dependency injection design, ensures that most components or classes areReplaceableAndReusableYes.

Framework component library in addition to the common coroutine versionMySQL clientRedis client, and we’ve also prepared theEloquent ORMWebsocket server and clientJSON RPC server and clientGrpc server and clientOpentracing (Zipkin, Jaeger) clientGuzzle HTTP clientElasticsearch clientConsul, Nacos Service CenterEtcd clientAMQP componentsNATs componentsConfiguration centers of Apollo, etcd, zookeeper, Nacos and alicloud ACMCurrent limiter based on token bucket algorithmUniversal connection poolFuseSwagger document generationSwoole TrackerBlade, Smarty, twig, plates and thinktemplate view enginesSnowflake global ID generatorPrometheus service monitoringAnd so on, which saves the trouble of implementing the corresponding version.

Hyperf also providesDependency injection container based on psr-11annotationAOP aspect oriented programmingMiddleware based on psr-15Custom processEvent manager based on psr-14Redis / rabbitmq message queueAutomatic model cachingCache based on psr-16Crontab second level timing taskSessionI18N internationalizationValidation form validationAnd other very convenient functions, to meet the rich technical scenarios and business scenarios, out of the box.

The original intention of the framework

Although the framework based on PHP language is now in an era of contention, we still can’t see a perfect framework with elegant design and ultra-high performance, or a framework that really paves the way for PHP micro services. This is the original intention of hyperf and its team members, and we will continue to invest in and make efforts for it, You are also welcome to join us in the open source construction.

Design concept

Hyperspeed + Flexibility = HyperfFrom the name we willUltra high speedandflexibilityAs the gene of hyperf.

  • For ultra-high speed, we are based on the spool coroutine and do a lot of optimization on the framework design to ensure ultra-high performance output.
  • For flexibility, we are based on hyperf’s powerful dependency injection components, which are all based onPSR standardMost of the components or classes in the framework are replaceable.

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

Complete documentation

We have invested a lot of time in the construction of documents to provide a high-quality document experience to solve various problems caused by the lack of documents. A large number of examples are also provided on the documents, which are also friendly to novices.

Hyperf official development document

Production available

We have done a lot of unit tests for the components to ensure the correctness of the logic1733Single test and total test5383Hyperf is a project that has experienced severe production environment. At present, many large Internet enterprises have deployed hyperf to their own production environment and run stably.

Official website and communication

GithubPoint star to support us

Gitee code cloudPoint star to support us

Hyperf website

Hyperf document

Hyperf communication group (full): 862099724

Hyperf communication group 2: 811414891

Nail group (full): 34538367

Nail group 2: 34488757

This work adoptsCC agreementReprint must indicate the author and the link of this article