Update content
This week, we added some new features and fixed bugs in some components to continue to improve the stability of hyperf, which was released on2.0.10Users are advised to update this version with the following command.
composer update "hyperf/*" -o
Direct access to the official websitehyperf.ioOr documenthyperf.wikiView updates
newly added
- #2411byhyperf/databaseNew components
Hyperf\Database\Query\Builder::forPageBeforeId
method. - #2420 #2426byhyperf/commandNew default options for components
enable-event-dispatcher
Used to initialize event triggers. - #2433byhyperf/grpc-serverAnonymous function support is added to component routing.
- #2441byhyperf/socketio-serverIn component
SocketIO
Some new ones have been addedsetters
。
repair
- #2427Fix event triggers in use
Pivot
orMorphPivot
The issue of non effectiveness. - #2443Repair and usehyperf/GuzzleComponent
Coroutine Handler
Cannot get and pass correctlytraceid
andspanid
It’s a matter of time. - #2449Repair releasehyperf/config-apolloComponent configuration file, configuration file name error.
optimization
- #2429Optimized use
@Inject
And it’s not set@var
Error information when the program is running, which is convenient to locate the problem and improve the programming experience. - #2438Optimize when usinghyperf/model-cacheWhen a component is used with a database transaction, deleting or modifying the model data in the transaction will delete the cache immediately after the transaction is submitted, instead of deleting the cache data when the model data is deleted or modified.
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-FPM
The standard components are based onPSR standardImplementation, based on powerful dependency injection design, ensures that most components or classes areReplaceable
AndReusable
Yes.
Framework component library in addition to the common coroutine versionMySQL client
、Redis client
, and we’ve also prepared theEloquent ORM
、Websocket server and client
、JSON RPC server and client
、Grpc server and client
、Opentracing (Zipkin, Jaeger) client
、Guzzle HTTP client
、Elasticsearch client
、Consul, Nacos Service Center
、Etcd client
、AMQP components
、NATs components
、Configuration centers of Apollo, etcd, zookeeper, Nacos and alicloud ACM
、Current limiter based on token bucket algorithm
、Universal connection pool
、Fuse
、Swagger document generation
、Swoole Tracker
、Blade, Smarty, twig, plates and thinktemplate view engines
、Snowflake global ID generator
、Prometheus service monitoring
And so on, which saves the trouble of implementing the corresponding version.
Hyperf also providesDependency injection container based on psr-11
、annotation
、AOP aspect oriented programming
、Middleware based on psr-15
、Custom process
、Event manager based on psr-14
、Redis / rabbitmq message queue
、Automatic model caching
、Cache based on psr-16
、Crontab second level timing task
、Session
、I18N internationalization
、Validation form validation
And 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 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, which is hyperf We will continue to invest and work hard for the original intention of our team members. You are welcome to join us in the open source construction.
Design concept
Hyperspeed + Flexibility = Hyperf
From the name we willUltra high speed
andflexibility
As 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 logic1492
Single test and total test4651
Hyperf 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
This work adoptsCC agreementReprint must indicate the author and the link of this article