Hyperf releases version v2.0.13, enterprise level PHP microservice cloud native process framework


Update content

This week, we added some new features and fixed bugs of some components, and continued to improve the stability of hyperf. We released the2.0.13It is recommended that you use the following command to update this version.

composer update "hyperf/*" -o

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

newly added

  • #2445When using the exception catcherWhoopsExceptionHandlerreturnJSONWhen formatting the data, automatically add an exceptionTraceInformation.
  • #2580newly addedgrpc-clientComponent’smetadatasupport.


  • #2559Repair and usesocket-ioconnectsocketio-serverBecause of carryingqueryInformation that causes an event to fail to be triggered.
  • #2565Fixed the proxy class was used without a parent class due to the existence of an anonymous classparent::classAnd the problem of reporting errors.
  • #2578Fix the event when the custom process is thrown incorrectlyAfterProcessHandleProblems that cannot be triggered.
  • #2582Repair and useRedis::multiAnd in thedeferOthers are used inRedisAfter the command, theRedisAn error is reported when it is used by two coroutines at the same time.
  • #2589When using the coprocess style service,AMQPThe problem that consumers can’t start normally.
  • #2590When using the coprocess style service,CrontabThe problem of not working properly.


  • #2561Optimization shutdownAMQPError message when connection failed.
  • #2584When the service is shut down, it is not deletedNacosThe corresponding service in.

About hyperf

Hyperf is based onSwoole 4.5+The implementation of the high-performance, high flexibility PHP coprocessing framework, built-in coroutine server and a large number of commonly used components, performance than the traditional based onPHP-FPMThe framework has qualitative improvement, provides ultra-high performance, but also maintains extremely flexible scalability, 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 coprocessor versionMySQL clientRedis client, we also have a 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 componentsConfiguration centers of Apollo, etcd, zookeeper, Nacos and alicloud ACMFault current limiter based on token bucket algorithmUniversal connection poolFuseSwagger document generationSwoole TrackerBlade, Smarty, twig, plates and thinktemplate view enginesSnowflake global ID generatorPrometheus service monitoringIt can save the trouble of implementing the corresponding version of the coroutine.

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 so on very convenient function, meet the rich technical scene and business scene, open the box use.

The original intention of the framework

Although the framework based on PHP language is in the era of a hundred flowers contending, we still can’t see a perfect framework for the coexistence of elegant design and ultra-high performance, nor a framework that paves the way for PHP microservices. This is hyperf And the original intention of our team members, we will continue to invest and make efforts to this end. You are also welcome to join us in the open source construction.

Design concept

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

  • For ultra-high speed, we base on the swote coprocessor and do 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 component, which is based onPSR standardThe contract is implemented by the contract defined by hyperf, and most of the components or classes in the framework are replaceable.

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

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. The documents also provide a lot of examples, which are equally friendly to novices.

Official development document of hyperf

Production available

We have done a lot of unit testing for the components to ensure that the logic is correct, which currently exists1537A total of4779According to the assertion conditions, hyperf is a project which has experienced severe production environment test. At present, many large Internet enterprises have deployed hyperf to their own production environment and run stably.

Official website and communication

GithubStar support us

Gitee code cloudStar support us

Hyperf official website

Hyperf documents

Hyperf group (full): 862099724

Hyperf communication group 2: 811414891

This work adoptsCC agreementThe author and the link to this article must be indicated in the reprint

Recommended Today

Comparison and analysis of Py = > redis and python operation redis syntax

preface R: For redis cli P: Redis for Python get ready pip install redis pool = redis.ConnectionPool(host=’′, port=6379, db=1) redis = redis.Redis(connection_pool=pool) Redis. All commands I have omitted all the following commands. If there are conflicts with Python built-in functions, I will add redis Global command Dbsize (number of returned keys) R: dbsize P: print(redis.dbsize()) […]