Hyperf releases v2.0.4 | enterprise level PHP microservice cloud native collaboration framework

Time:2020-11-25

Update content

This week, we mainly fixed some component bugs and continued to improve the stability of hyperf, which was released in2.0.4It is recommended that users update this version.

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

newly added

  • #2144Database query eventsHyperf\Database\Events\QueryExecutedadd to$resultField.
  • #2158routeHyperf\HttpServer\Router\Handler, add$optionsField.
  • #2162Hot update component addHyperf\Watcher\Driver\FindDriver
  • #2169 SessionNew configuration of componentssession.options.domainFor replacementRequestFrom thedomain
  • #2174Model builder addModelRewriteTimestampsVisitor, which is used according to the database fieldcreated_atandupdated_at, overriding model fields$timestamps
  • #2175Model builder addModelRewriteSoftDeletesVisitor, which is used according to the database fielddeleted_at, add or removeSoftDeletes
  • #2176Model builder addModelRewriteKeyInfoVisitor, which is used to rewrite the model fields according to the database primary key$incrementing $primaryKeyand$keyType

repair

  • #2149Fix the bug that cannot be updated normally from Nacos while the custom process is running.
  • #2159Repair and usegen:migrationBecause the file already existsFATALAbnormal.

optimization

  • #2043WhenSCANA more friendly exception is thrown when no directory exists.
  • #2182When usingWebSocketandHttpService andHttpWhen the interface is accessed, it is not recordedWebSocketClose the log for the connection.

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 other very convenient functions to meet the rich technical and business scenarios, out of the box.

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 exists1453A total of4473Hyperf is a project that 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