Added
- #401 Optimized server and fixed middleware that user defined does not works.
- #402 Added Annotation
@AsyncQueueMessage. - #418 Allows send WebSocket message to any
fdin current server, even the worker process does not hold thefd - #420 Added listener for model.
- #429 #643 Added validation component, a component similar to illuminate/validation.
- #441 Automatically close the spare redis client when it is used in low frequency.
- #478 Adopt opentracing interfaces and support Jaeger.
- #500 Added fluent method calls of
Hyperf\HttpServer\Contract\ResponseInterface. - #523 Added option
table-mappingfor commanddb:model. - #555 Added global function
swoole_hook_flagsto get the hook flags by constantSWOOLE_HOOK_FLAGS, and you could define inbin/hyperf.phpvia! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);to define the constant. - #596 #658 Added
requiredparameter for@Inject, if you define@Inject(required=false)annotation to a property, therefore the DI container will not throw anHyperf\Di\Exception\NotFoundExceptionwhen the dependency of the property does not exists, the default value ofrequiredparameter istrue. In constructor injection mode, you could define the default value of the parameter of the__constructtonullor define the parameter as anullableparameter , this means this parameter is nullable and will not throw the exception too. - #597 Added concurrent for async-queue.
- #599 Allows set the retry seconds according to attempt times of async queue consumer.
- #619 Added HandlerStackFactory of guzzle.
- #620 Add automatic restart mechanism for consumer of async queue.
- #629 Allows to modify the
clientIp,pullTimeout,intervalTimeoutof Apollo client via config file. - #648 Added
nackreturn type of AMQP consumer, the abstract consumer will executebasic_nackmethod when the message handler return aHyperf\Amqp\Result::NACK. - #654 Added all Swoole events and abstract hyperf events.
Changed
- #437 Changed
Hyperf\Testing\Clienthandle exception handlers instead of throw an exception directly. - #463 Simplify
container.phpand improve annotation caching mechanism.
config/container.php
<?php
use Hyperf\Di\Container;
use Hyperf\Di\Definition\DefinitionSourceFactory;
use Hyperf\Utils\ApplicationContext;
$container = new Container((new DefinitionSourceFactory(true))());
if (! $container instanceof \Psr\Container\ContainerInterface) {
throw new RuntimeException('The dependency injection container is invalid.');
}
return ApplicationContext::setContainer($container);- #486 Changed
getParsedBodyof Request is available to return JSON formatted data normally. - #523 The command
db:modelwill generate the singular class name of an plural table as default. - #614 #617 Changed the structure of config provider, also moved
config/dependencies.phptoconfig/autoload/dependencies.php, also you could placedependenciesinto config/config.php.
Changed the structure of config provider:
Before:
'scan' => [
'paths' => [
__DIR__,
],
'collectors' => [],
],Now:
'annotations' => [
'scan' => [
'paths' => [
__DIR__,
],
'collectors' => [],
],
],- #630 Changed the way to instantiate
Hyperf\HttpServer\CoreMiddleware, usemake()instead ofnew. - #631 Changed the way to instantiate AMQP Consumer, use
make()instead ofnew. - #637 Changed the argument 1 of
Hyperf\Contract\OnMessageInterfaceandHyperf\Contract\OnOpenInterface, useSwoole\WebSocket\Serverinstead ofSwoole\Server. - #638 Renamed command
db:modeltogen:modeland added rewrite connection name visitor.
Deleted
- #401 Deleted class
Hyperf\JsonRpc\HttpServerFactory,Hyperf\HttpServer\ServerFactory,Hyperf\GrpcServer\ServerFactory. - #402 Deleted deprecated method
AsyncQueue::delay. - #563 Deleted deprecated constants
Hyperf\Server\ServerInterface::SERVER_TCP, useHyperf\Server\ServerInterface::SERVER_BASEto instead of it. - #602 Removed timeout property of
Hyperf\Utils\Coroutine\Concurrent. - #612 Deleted useless
$urlfor RingPHP Handlers. - #616 #618 Deleted useless code of guzzle.
Optimized
- #644 Optimized annotation scan process, separate to two scan parts
appandvendor, greatly decrease the elapsed time. - #653 Optimized the detect logical of swoole shortname.
Fixed
- #448 Fixed TCP Server does not works when HTTP Server or WebSocket Server exists.
- #623 Fixed the argument value will be replaced by default value when pass a
nullto the method of proxy class. - #647 Append
eofto TCP response, according to the server configuration.
Fixed
- #636 Fixed http client with pool handler may be used by different coroutine at the same time.