Hyperf releases v2.0.18, an enterprise level PHP microservice cloud native collaboration framework


Update content

This week, we mainly added some features, fixed bugs of some components, and continued to improve the stability of hyperf, which was released on2.0.18Edition.

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

matters needing attention

  • Please removerequire-devMediumdoctrine/commonassembly

doctrine/commonComponent2.xVersion andhyperf/utilsConflict, so it will lead tohyperf/utilsUnable to update.

newly added

  • #2752For annotation@AutoController @Controllerand@Mappingadd tooptionsParameter, used to set routing metadata.


  • #2768repairWebSocketMemory leak caused by handshake failure.
  • #2777Fix lower versionredisExpansion,RedisClusterConstructor$authI won’t support itnull, leading to error reporting.
  • #2779Repair because there is no settingtranslationThe configuration file causes the service to fail to start.


  • #2765changeConcurrentClass is created by the methodHyperf\Utils\Coroutine::create()Replace the originalSwoole\Coroutine::create()


  • #2347byAMQPYesConsumerMessageAdd parameters$waitTimeout, used to safely stop the service in the collaborative process style service.

About hyperf

Hyperf is based onSwoole 4.5+The high-performance and flexible PHP collaboration framework, built-in collaboration server and a large number of commonly used components, with better performance than the traditional one based onPHP-FPMThe framework has been improved qualitatively, providing ultra-high performance while maintaining extremely flexible scalability. Standard components are based onPSR standardImplementation, based on powerful dependency injection design, ensures that most components or classes areReplaceableAndReusableYes.

In addition to the common collaborative version of the framework component libraryMySQL clientRedis clientIn addition, we have prepared the collaborative program version for youEloquent ORMWebsocket server and clientJSON RPC server and clientGrpc server and clientOpentracing (Zipkin, Jaeger) clientGuzzle HTTP clientElasticsearch clientConsul, Nacos Service CenterEtcd clientAMQP componentsNATs assemblyConfiguration centers of Apollo, etcd, zookeeper, Nacos and Alibaba cloud ACMCurrent limiter based on token bucket algorithmUniversal connection poolFuseSwagger document generationSwoole TrackerBlade, Smarty, twig, plates, and thinktemplate view enginesSnowflake global ID generatorPrometheus service monitoringAnd other components, saving the trouble of implementing the corresponding collaborative process 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 cachingPsr-16 based cacheCrontab second timed taskSessionI18N internationalizationValidation form validationAnd other very convenient functions to meet rich technical and business scenarios, out of the box.

Original intention of the framework

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

Design concept

Hyperspeed + Flexibility = Hyperf, from the name, we willUltra high speedandflexibilityAs a gene for hyperf.

  • For ultra-high speed, we are based on the swoole coprocess and make a lot of optimization in the framework design to ensure the output of ultra-high performance.
  • For flexibility, we are based on hyperf’s powerful dependency injection components, which are based onPSR standardThe contract and the contract implementation defined by hyperf make most of the components or classes in the framework replaceable.

Based on the above characteristics, hyperf will have rich possibilities, such as realizing single web services, API services, gateway services, 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 high-quality document experience to solve various problems caused by missing documents. A large number of examples are also provided in the documents, which are also friendly to novices.

Hyperf official development documents

Production available

We have conducted a lot of unit tests for components to ensure the correctness of logic, which currently exists1561Single measurement in total4856Hyperf is a project that has experienced the severe test of 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 official website

Hyperf document

Hyperf communication group (full): 862099724

Hyperf communication group 2: 811414891

Nail group (full): 34538367

Nail group II: 34488757

This work adoptsCC agreement, reprint must indicate the author and the link to this article