? hyperf releases multiple components v1.0.12 | enterprise PHP microservice collaboration framework

Time:2020-1-11

Update content

This week’s update mainly adds a useful context to the processoverrideMethod, add the configuration form of multiple handlers for the logger configuration, and fix the bug of some other components, which is published in version 1.0.12. It is recommended to use theGRPCWebSocketandFile uploadUser update for.
The documents of related components can be viewed through the hyperlink above, or directly visit the official website https://hyperf.io or the document https://doc.hyperf.io.

How to use hyperf \ utils \ context:: override()

<?php
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\Utils\Context;

//Take the $request object from the cooperation context and set the header with key as foo, and then save it to the cooperation context
$request = Context::override(RequestInterface::class, function (RequestInterface $request) {
    return $request->withAddedHeader('foo', 'bar');
});

Newly added

  • #405 increaseHyperf\Utils\Context::override()Method, now you can passoverrideMethod to get the value of some cooperation context and modify it;
  • #415 add configuration support for multiple handlers to the logger’s configuration file;

change

  • #431 removedHyperf\GrpcClient\GrpcClient::openStream()This parameter will not affect the actual use;

repair

  • #414 repairHyperf\WebSockerServer\Exception\Handler\WebSocketExceptionHandlerThe problem of wrong variable name in;
  • #424 fix guzzle in useHyperf\Guzzle\CoroutineHandlerTime allocationproxyParameter does not support array value passing;
  • #430 repairHyperf\HttpServer\Request::file()When uploading multiple files with one name, the problem of incorrect format is returned;
  • #431 fix the problem that the request object of grpc client lacks parameters when sending the force close request;

Abandoning mark

  • #425 markerHyperf\HttpServer\HttpServerFactory, Hyperf\JsonRpc\HttpServerFactory, Hyperf\JsonRpc\TcpServerFactoryby@deprecatedThe three classes willv1.1Remove;

About hyperf

Hyperf is based onSwoole 4.3+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 clientRedis clientIt also provides you with a collaborative version ofEloquent ORMWebsocket server and clientJSON RPC server and clientGrpc server and clientZipkin (opentracking) clientGuzzle HTTP clientElasticsearch clientConsul clientEtcd clientAMQP componentApollo configuration centerAlicloud ACM application configuration managementEtcd configuration centerCurrent limiter based on token bucket algorithmUniversal connection poolFuseSwagger document generationSwoole enterpriseBlade and Smarty view engineAnd other components save 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 scheduled tasksAnd 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 are576Single survey1909Four assertion conditions and high-quality documents have been maintained. Before hyperf was 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.   

Official website and communication

GitHub and star support us
Gitee code cloud point star supports us
Hyperf official website
QQ group: 862099724