docs/en/changelog/2.1.md
RequiredIf can be exploited to generate gadget chains for deserialization vulnerabiltiies.in and not in rule for validation in input fails to correctly check in:00 rule when passing 0.counter or duration for circuit breaker.10-12/1,14-15/1 does not works.10-12 does not works.$workerId does not works in annotation @Task.AbstractServiceClient::getNodesFromConsul().CoroutineHandler, which is more friendly than before.describe:routes.class_map does not works in Hyperf\Di\Annotation\Scanner.Hyperf\Rpc\PathGenerator\DotPathGenerator.increment/decrement does not works as expect when used in transaction for model-cache.onOpen in coroutine style websocket server.fromSub() and joinSub() don't work with table prefix.enable parameter of the @Crontab supports array, which you can dynamically control whether the task is executed or not.@Inject does not works in nested trait.Hyperf\HttpServer\Request::clearStoredParsedData().Hyperf\Di\Aop\PropertyHandlerTrait.withMax() withMin() withSum() and withAvg().Sender::getResponse() which you can used to get response from coroutine style server.ttl does not works on other workers for socketio-server.@Crontab does not works when used in methods.Hyperf\Utils\Channel\Caller.phar:build, which can support symlink package.co-phpunit.$connection and $attempts for Hyperf\DbConnection\Annotation\Transactional.Hyperf\Testing\Client::sendRequest() that you can use your own server request.Arr::forget failed when the integer key does not exists.FormRequest could't get the changed data from Context.uri when using Hyperf\Testing\Client.constants which defined in bin/hyperf.php does not works for server:start.pid_file will be created accidently when you don't configure pid_file in coroutine style server.phar:build that you can run phar without php, such as ./composer.phar instead of php composer.phar.gen:model.unpack custom data failed when using JsonEofPacker.$constraints by other coroutine.enable to control the crontab task which to register or not.testing which mock request in an alone coroutine.hyperf/cache.Blueprint::comment() which you can set comment of table for migration.RouteCollector::getRouteParser which you can get RouteParser from RouteCollector.hyperf/db.doctrine/dbal.Pipeline::handleCarry() which to handle the returning value.Hyperf\Utils\Reflection\ClassInvoker which you can used to execute non public methods or get non public properties.-M which you can mount external files or dirs to a virtual location within the phar archive for phar:build.stoped to stopped for hyperf/signal.autoCommit does not works when you set false for hyperf/kafka.defer cannot be triggered in nsq consumer.hyperf/kafka which won't make a new producer to requeue message.longlang/phpkafka checked.middlewares when using rpc-server.hyperf/database.orderBy does not works for hyperf/scout.Hyperf\Utils\CodeGen\Package::getPrettyVersion().jean85/pretty-package-versions to ^1.2|^2.0, which support composer 2.x.Hyperf\Database\Schema\MySqlBuilder::getColumnListing does not works in MySQL 8.0.FindNewerDriver which is friendly with mac, linux and docker for watcher.retry_count for JsonRpcPoolTransporter, the default retry count is 2.set_error_handler of ErrorExceptionHandler, which expects callable(int, string, string, int, array): bool.hyperf/json-rpc, try to reconnect the server when connection closed.tracer does not works in hyperf v2.1.describe:routes command.SWOOLE_HOOK_SOCKETS conflicts with jaeger tracing.true for PDO::ATTR_PERSISTENT.doctrine/dbal does not works when using migration.ComponentAttributeBag::has() for view-engine.save() after increment() with extra.hyperf/db.getRealPath does not works in phar.ElasticsearchEngine::getTotalCount() in hyperf/scout.hyperf/kafka component.ConnectionInterface::run(Closure $closure) for hyperf/db.phar:build for rewriting scan_cacheable.league/flysystem to ^1.0.true for PDO::ATTR_PERSISTENT.Engine::close protocol and improve error handling for socketio-server.php to >=7.3;phpunit/phpunit to ^9.0;guzzlehttp/guzzle to ^6.0|^7.0;vlucas/phpdotenv to ^5.0;endclothing/prometheus_client_php to ^1.0;twig/twig to ^3.0;jcchavezs/zipkin-opentracing to ^0.2.0;doctrine/dbal to ^3.0;league/flysystem to ^1.0|^2.0;$name from Hyperf\Amqp\Builder.consume from Hyperf\Amqp\Message\ConsumerMessageInterface.$running from Hyperf\AsyncQueue\Driver\Driver.parseParameters from Hyperf\HttpServer\CoreMiddleware.ON_WORKER_START and ON_WORKER_EXIT from Hyperf\Utils\Coordinator\Constants.get from Hyperf\Utils\Coordinator.rate-limit.php, please use rate_limit.php instead.Hyperf\Resource\Response\ResponseEmitter.hyperf/paginator from database's dependencies.stats from Hyperf\Utils\Coroutine\Concurrent.Hyperf\Utils\Coroutine::parentId which returns the parent coroutine ID
Hyperf\Guzzle\CoroutineHandler
executeinitHeaders will return $headers, instead of assigning "$headers" directly to the client.checkStatusCode#2720 Don't set data_type for PDOStatement::bindValue.
#2871 Use (string) $body instead of $body->getContents() for getting contents from StreamInterface, because method getContents() only returns the remaining contents in a string.
#2909 Allow setting repeated middlewares.
#2935 Changed the string format for default exception formatter.
#2979 Don't format decimal to float for command gen:model by default.
Hyperf\AsyncQueue\Signal\DriverStopHandler will be deprecated in v2.2, please use Hyperf\Process\Handler\ProcessStopHandler instead.Hyperf\Server\SwooleEvent will be deprecated in v3.0, please use Hyperf\Server\Event instead.HttpServer for Swow.Hyperf\AsyncQueue\Listener\QueueHandleListener which can record running logs for async-queue.Hyperf\Utils\Waiter which can wait coroutine to end.Hyperf\Database\Model\Collection::columns().$depth and $flags for Json::decode and Json::encode.https not only http.socketio-server.ProceedingJoinPoint::getInstance() to get instance which will be called by AOP.hyperf/tracer which will log and tag exception in a span.hyperf/snowflake is broken due to missing hyperf/contract.Arr::merge() does not works when $array1 is empty.hyperf/phar component.scout.php which search engine index is used as the model index name by default.Swoole\ExitException trace message in command.onStart event from server default callbacks when the mode is SWOOLE_BASE.count() for Parallel.with() for ORM.onMessage or onClose failed in websocket server.alpha_dash does not support int.server.settings.daemonize configuration when using hyperf/watcher.php-amqplib to v2.9.2.ConfigProvider allows publish directory.no-restart for watcher.--chunk and --column|c into command scout:import.scan.ignore_annotations does not works when using watcher.simplePaginate() which return PaginatorInterface in Hyperf\Database\Query\Builder.PaginatorInterface to LengthAwarePaginatorInterface for method paginate() in Hyperf\Database\Query\Builder.Json and Xml.Hyperf\Server\ServerConfig which return type of __set should be void.Hyperf\Database\Schema\ColumnDefinition.options.cookie_lifetime for hyperf/session, you can use it to control the expire time for cookies.__handlePropertyHandler() statically in class proxy.BootProcessListener of config-etcd does not works in coroutine style server.index instead of type for searchableAs, when the config of index is null or the elastic version is more than 7.0.0.options for @AutoController @Controller and @Mapping.$auth does not support null for low version of ext-redis.Hyperf\Utils\Coroutine::create() instead of Swoole\Coroutine::create() for Concurrent.$waitTimeout for ConsumerMessage to stop amqp consumer safely in coroutine style server.Hyperf\Tracer\Aspect\JsonRpcAspect which support json-rpc for tracer component.@mixin into Model, you can use static methods friendly.--with-ide which used to generate ide file.Arr::merge does not works when array1 does not constains the $key.Paginator::resolveCurrentPath deos not works.__ will not be registered into service for rpc-server.getCacheTTL for CacheableInterface which can control cache time each models.CastsValue, because $isSynchronized don't have default value.$items will be replaced by __construct for CastsValue.hyperf/retry.Container::define() does not works when the class has been resolved.FindDriver for watcher, you can use it in alpine image.tracer which ensure span finished and flushed.Hyperf\Utils\Resource::from which can convert string to resource.RedisSecondMetaGenerator will generate the same meta.scout:flush.hyperf/scout, a coroutine friendly version of laravel/scout.hyperf/resource and hyperf/resource-grpc which can format model to response easily.@property will be replaced by @property-read when the property has getter and setter at the same time.RetryAnnotationAspect.hyperf/testing.whereNull to accept array columns argument.WhoopsExceptionHandler when the header accept is application/json.query for socketio-server.parent::class but the class scope has on parent.AfterProcessHandle won't be dispatched when throw exception in process.column_type for MySqlGrammar::compileColumnListing.hyperf/database.@property of mutated attribute will be replaced by morphTo for gen:model.Socket::getRequest to retrieve psr7 request from socket for socketio-server.ReloadChannelListener to reload timeout or failed channels automatically for async-queue.ModelRewriteGetterSetterVisitor for gen:model.throwable to the end of arguments of fallback for retry component.fill does not works for camel case model.Sender::check does not works when the checked fd not belong to websocket.beginTransaction failed when the pdo is null.http for reactive-x.FallbackRetryPolicy which support class@method, the class will be get from Container.Hyperf\Database\Query\Builder::forPageBeforeId for database.enable-event-dispatcher to initialize EventDispatcher for command.SocketIO.Pivot and MorphPivot.@var for @Inject.nacos.enable to control the hyperf/nacos component.ts header for gRPC request of client, compatible with Node.js gRPC server etc.optional() to create Hyperf\Utils\Optional object or for more convenient way to use.server:start failed, when the config of pid_file changed.digits does not support int.content-type header automatically by default for hyperf/validation component.Arr::merge to merge array more friendly than array_merge_recursive.Hyperf/Utils/Optional which accepts any argument and allows you to access properties or call methods on that object.RedisNsqAdapter which publish message through nsq for socketio-server.__FUNCTION__ and __METHOD__ magic constants does work in closure of aop proxy classResolverDispatcher which is friendly for circular dependencies.markrogoyski/math-php requirement from ^0.49.0 to ^1.2.0co::create failed in non-coroutine environment for hyperf/signal.loadBalancer for nacos.Hyperf\Watcher\Driver\FindDriver.In or InRaw for model-cache.$result for QueryExecuted.Hyperf\Watcher\Driver\FindDriver for hyperf/watcher.session.options.domain for hyperf/session to change the domain which get from request.ModelRewriteTimestampsVisitor to rewrite $timestamps based on created_at and updated_at for Model.ModelRewriteSoftDeletesVisitor to insert or remove SoftDeletes based on deleted_at for Model.ModelRewriteKeyInfoVisitor to rewrite $incrementing $primaryKey and $keyType for Model.gen:migration.hyperf/nacos component.SIGINT listened by Hyperf\Signal\Handler\WorkerStopHandler.hyperf/filesystem.\Hyperf\Snowflake\Concern\HasSnowflake Trait to integrate hyperf/snowflake and database models.@Inject will be useless sometimes when using server:watch.redis::call will be recorded twice.ValidationMiddleware will throw exception in websocket.$perPage from int to ?int for method Hyperf\Database\Model\Builder::paginate.SIGTERM if the process not exists for hyperf/watcher.hyperf/di.@property if user redeclare it when using gen:model.$min-$max parsing errors.hyperf.pid won't be created in coroutine server.Expect: 100-Continue header when put a large file.hyperf/watcher.gen:command.vendor:publish.OnWorkerExit callback by default for server.ScanFileDriver to watch file changes for hyperf/watcher.hyperf/watcher.hyperf/session.int and string.Hyperf\WebSocketServer\Sender which only support push and disconnect.doctrine/inflector to ^2.0 for hyperf/utils.send sendto and close from Hyperf\WebSocketServer\Sender.Hyperf\HttpServer\ResponseEmitter::isMethodsExists() method does not works as expected.config/autoload/aspects.php does not exists.initRequestAndResponse failed.aspects.php is edited.@Inject does not work when the parent class has the same property.gen:model generate property failed, when used morphTo or where.0 to SIGTERM when swoole short name do not set disable.new identifier. But now, in v2.0, it is available. But there is still has an exception, the classes that used in bootstrap stage still cannot works.@Inject or @Value annotation in the constructor of current class. But now, in v2.0, it is available.@Inject and @Value annotation in the class instance that created by Hyperf DI container. But now, in v2.0, it is available in any ways, such as the class instance that created by new identifier.@Inject annotation in any class without define use Hyperf\Di\Annotation\Inject;.__CLASS__. But now, in v2.0, the proxy class will keep the same structure with the original class, will not change the class name or the class structure.priority parameter for Aspect, now you could define priority in Aspect class by class property or annotation property, to manage the order of the aspects.@Aspect annotation, you cannot define the Aspect class by configuration file. But now, in v2.0, it is available to define the Aspect class by configuration file or ConfigProvider.Hyperf\Di\Listener\LazyLoaderBootApplicationListener to enable lazy loading. In 2.0, lazy loading can be used directly. This listener is therefore removed.annotations.scan.class_map configuration, now you could replace any content of class dynamically above the autoload rules.ext-swoole to >=4.5;psr/event-dispatcher to ^1.0;monolog/monolog to ^2.0;phpstan/phpstan to ^0.12.18;vlucas/phpdotenv to ^4.0;symfony/finder to ^5.0;symfony/event-dispatcher to ^5.0;symfony/console to ^5.0;symfony/property-access to ^5.0;symfony/serializer to ^5.0;elasticsearch/elasticsearch to ^7.0;Hyperf\Di\Aop\AstCollector;Hyperf\Di\Aop\ProxyClassNameVisitor;Hyperf\Di\Listener\LazyLoaderBootApplicationListenerdispatch(...$params) from Hyperf\Dispatcher\AbstractDispatcherHyperf\Contract\NormalizerInterface => Hyperf\Utils\Serializer\SymfonyNormalizer from ConfigProvider in utils.$server parameter of Hyperf\Contract\OnOpenInterface、Hyperf\Contract\OnCloseInterface、Hyperf\Contract\OnMessageInterface、Hyperf\Contract\OnReceiveInterface;#992 Added ReactiveX component.
#1245 Added Annotation ExceptionHandler.
#1245 Exception handler's config and annotation support priority.
#1819 Added hyperf/signal component.
#1844 Support type \DateInterval for ttl in model-cache.
#1855 Added ConstantFrequency to flush one connection, when it is idle connection for the interval of time.
#1871 Added sink for guzzle.
#1805 Added Coroutine Server.
bind(Server $server) to bind($server) in Hyperf\Contract\ProcessInterface.isEnable() to isEnable($server) in Hyperf\Contract\ProcessInterfaceHyperf\AsyncQueue\Environment, can only applies in the current coroutine, not the whole current process.#1877 Support to use typehint of property on PHP 8 to replace @var when using @Inject annotation, for example:
class Example {
/**
* @Inject
*/
private ExampleService $exampleService;
}
Hyperf\HttpServer\ResponseEmitter class to emit any PSR-7 response object with Swoole server, and extracted Hyperf\Contract\ResponseEmitterInterface.getTrailers() and getTrailer(string $key) and withTrailer(string $key, $value) methods for Hyperf\HttpMessage\Server\Response.Hyperf\WebSocketServer\Sender::close(int $fd, bool $reset = null).TypeError for StartServer::execute.is_resource does not works when use Runtime::enableCoroutine() privately in filesystem.Request::isXmlHttpRequest does not work.Hyperf\HttpMessage\Exception\HttpException exception class to replace the way of direct response in Dispatcher, also provided an Hyperf\HttpServer\Exception\Handler\ httptionHandler ExceptionHandler to handle these HTTP Exception;Hyperf\Contract\NormalizerInterface when you require symfony/serialize. You can added dependiencies below to use symfony serializer.use Hyperf\Utils\Serializer\SerializerFactory;
use Hyperf\Utils\Serializer\Serializer;
return [
Hyperf\Contract\NormalizerInterface::class => new SerializerFactory(Serializer::class),
];
Hyperf\GrpcClient\BaseClient methods simpleRequest, getGrpcClient, clientStreamRequest to _simpleRequest, _getGrpcClient, _clientStreamRequest.Hyperf\Contract\Sendable interface and all implementations of it.config/server.php, you can merge it into config/config.php.refId for grafana.json.concurrent.limit does not works when using another pool.socketio-server.Model::orWhereHasMorph ,Model::whereDoesntHaveMorph and Model::orWhereDoesntHaveMorph.Hyperf\Command\Command::choiceMultiple(): array method, because the return type of choice method is string, so the methed cannot handle the multiple selections, even though setted $multiple argument.Castable, CastsAttributes and CastsInboundAttributes.Model\Builder::withCasts.Model::loadMorph, Model::loadMorphCount and Model::syncAttributes.-R of --refresh-fillable for command gen:model.Context::copy does not works when use keys.hyperf/socketio-server.morphWith and whereHasMorph for hyperf/database component.Hyperf\ModelCache\Handler\RedisStringHandler for hyperf/model-cache component, store the cache data in string type.Hyperf\View\Exception\RenderException to rethrow render exceptions in view.consul.jsonrpc-tcp-length-check protocol.describe:routes will show the wrong list.MysqlProcessor::processColumns does not work when the MySQL server is 8.0 version.co-phpunit do not broken in coroutine environment, when cases failed.maxConsumption for amqp consumer.go is not adaptive with swoole.describe:routes failed when router handler is Closure.getStream method in UploadedFile.php.hyperf/websocket-server.onOneServer option not resetting mutex on shutdown.Hyperf\GrpcServer\CoreMiddleware.describe:routes command's server option not take effect.migrate:refresh command's step is int.filesystem for FileSystemDriver in hyperf/cache.\Redis to RedisProxy for RedisDriver in async-queue.maxAttempts parameter for Hyperf\AsyncQueue\Annotation\AsyncQueueMessage annotation to control the maximum retry time of job.Hyperf/Utils/CoordinatorManager to better handling of graceful start and graceful stop.@mixin annotation in redis component.hyperf/constants.getHandler() for Hyperf/Guzzle/HandlerStackFactory and use make() function to create the handler instead of new operator when it is possible.Hyperf\Testing\Client::flushContext.make instead of new for async-queue.enable of every NSQ connection to control the consumer whether they start automatically.on_stats for guzzle handler.flatten() failed, bacause INF is float.Hyperf\HttpMessage\Stream\SwooleStream.use_default_value for model-cache to correct the cache data with database data automatically.isEnable() for NSQ Consumer to control the consumer whether they start automatically.Hyperf\DbConnection\Annotation\Transactional annotation to begin a transaction automatically.Hyperf\View\RenderInterface::getContents() method to get the contents of view render directly.ON_WORKER_ERROR.hidden.Hyperf\Redis\RedisFactory.SecurityToken is empty.describe:routes command to describe the routes information by command.config-aliyun-acm.getPoolNames() method for Hyperf\Pool\SimplePool\PoolFactory.Hyperf\DB\DB::connection() to use the specified connection.property-case for command gen:model.Grafana dashboard for hyperf\metric.ModelRewriteInheritanceVisitor to rewrite the model inheritance for command gen:model.Hyperf\LoadBalancer\LoadBalancerInterface::getNodes().AfterExecute for command.processors for logger.Hyperf\AsyncQueue\Listener\QueueLengthListener is no longer as the default listener of hyperf/async-queue.hyperf\metric.$httpMethod for Hyperf\RpcServer\Router\Router.(new Parallel())->add($callback, $key) and the parameter $key is a not string index, the returned result will sort $key from 0.Hyperf\AsyncQueue\Event\QueueLength event as the first parameterHyperf\Database\Schema\ForeignKeyDefinition for return type of Hyperf\Database\Schema\Blueprint::foreign() method.hyperf\crontab.$_SERVER has lower keys for super-globals.Hyperf\AsyncQueue\Process\ConsumerProcess.QueueLength for async-queue.error.data.code to json-rpc response.recv method to Hyperf\Rpc\Contract\TransporterInterface.enable for amqp consumer, which controls whether consumers should start along with the service.init-proxy.sh.Hyperf\Utils\Parallel.route for Hyperf\HttpServer\Contract\RequestInterface.Cacheable and CachePut.insertOrIgnore for database.$data of RenderInterface::render().traceId and spanId of the swoole-tracker component.Hyperf\Utils\Collection::random does not works when the number is null.size does not works without numeric or integer rules when the type of value is numeric.zendframework/zend-mime into laminas/laminas-mine.jsonrpc-tcp-length-check for jsonrpc.Hyperf\Utils\Collection::random does not works when the number is null.Hyperf\Database\Query\Builder::chunkById does not works when the collection item is array.Hyperf\Utils\Collection::operatorForWhere.tracer component.CoroutineMemoryDriver::delKey.alpha_num does not works.Hyperf\Tracer\Middleware\TraceMiddeware to Hyperf\Tracer\Middleware\TraceMiddleware.Hyperf\ServiceGovernance\Listener\ServiceRegisterListener , for better override it.basic_qos for amqp consumer.define() and set() to Container. Added Hyperf\Contract\ContainerInterface.job.stub.Hyperf\Cache\Driver\RedisDriver::clear sometimes fails to delete all caches.vendor:: publish return value does not support null.Command:: execute return value does not support null.arguments of Hyperf\Amqp\Builder\Builder not only support array.Hyperf\JsonRpc\JsonRpcPoolTransporter.close_on_destruct for hyperf/amqp.hyperf/db.RedisHandler::incr fails in cluster mode for model cache.migrate, save and has methods of Session do not work as expected.Hyperf\GrpcClient\GrpcClient::yield does not get the correct channel pool.parent::configure() of command.stub.Hyperf\DbConnection\ConnectionResolver::connection.@Listener and @Process into config which listeners and processes in ConfigProvider.init-proxy.sh command to only delete the runtime/container directory.Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler.strict_mode for config-apollo.Hyperf\Nats\Annotation\Consumer does not works as expected.Factory does not works for GraphQL.init-proxy command can not stop when hyperf/rpc-client component exists.Hyperf\Framework\Event\BeforeMainServerStart event.port property of URI of Hyperf\HttpMessage\Server\Request.requestSync in nats.Translator::setLocale does not works in coroutine evnironment.Hyperf\ModelCache\Cacheable::query to delete the model cache when batch updateincrement to atomic operation for model-cache.Hyperf\Utils\Codec\Json.Hyperf\Utils\Backoff.clear() method for Hyperf\Utils\Parallel to clear added callbacks.GraphQLMiddleware.Request::inputs default value does not works.composer.json does not support the root namespace.scan hScan zScan and sScan don't works for Redis.\Swoole\Timer::* to instead of swoole_timer_* functions.PUT and DELETE for Hyperf\Testing\Client.restartInterval for AbstractProcess.BeforeHandle AfterHandle and FailToHandle for command.config_etcd.enable does not works.protected to public for Pool::getConnectionsInChannel.di:init-proxy does not clear the runtime cache, If you want to delete them, use vendor/bin/init-proxy.sh instead.with-comments for command gen:model.AfterConsume,BeforeConsume,FailToConsume events for AMQP consumer.db:seed without filename.SymfonyNormalizer not denormalize result of type array.running to listening for AbstractProcess.concurrent.limit for AMQP consumer.gen:model, and ignore migrations table, and migrations table will not generate when execute the gen:model command.db:model to gen:model.gen:model, and ignore migrations table.validationData method of Hyperf\Validation\Request\FormRequest does not contains the uploaded files.download method of Hyperf\HttpServer\Contract\ResponseInterface does not works as expected.Call to a member function getName() on null in Hyperf\Validation\Middleware\ValidationMiddleware when the argument of action method does not define the argument type.ignoreAnnotations does not works when cache is used.getValidatorInstance.db:seed command without database selected.gen:request command.Hyperf\Validation\Middleware\ValidationMiddleware.Hyperf\Validation\Middleware\ValidationMiddleware will throw an unexpected exception when the action method has defined a non-object parameter.gen:model.@AsyncQueueMessage.fd in current server, even the worker process does not hold the fdHyperf\HttpServer\Contract\ResponseInterface.table-mapping for command db:model.swoole_hook_flags to get the hook flags by constant SWOOLE_HOOK_FLAGS, and you could define in bin/hyperf.php via ! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL); to define the constant.required parameter for @Inject, if you define @Inject(required=false) annotation to a property, therefore the DI container will not throw an Hyperf\Di\Exception\NotFoundException when the dependency of the property does not exists, the default value of required parameter is true. In constructor injection mode, you could define the default value of the parameter of the __construct to null or define the parameter as a nullable parameter , this means this parameter is nullable and will not throw the exception too.clientIp, pullTimeout, intervalTimeout of Apollo client via config file.nack return type of AMQP consumer, the abstract consumer will execute basic_nack method when the message handler return a Hyperf\Amqp\Result::NACK.Hyperf\Testing\Client handle exception handlers instead of throw an exception directly.container.php and improve annotation caching mechanism.config/container.php
<?php
use Hyperf\Di\Container;
use Hyperf\Di\Definition\DefinitionSourceFactory;
use Hyperf\Context\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);
getParsedBody of Request is available to return JSON formatted data normally.db:model will generate the singular class name of an plural table as default.config/dependencies.php to config/autoload/dependencies.php, also you could place dependencies into config/config.php.Changed the structure of config provider: Before:
'scan' => [
'paths' => [
__DIR__,
],
'collectors' => [],
],
Now:
'annotations' => [
'scan' => [
'paths' => [
__DIR__,
],
'collectors' => [],
],
],
Hyperf\HttpServer\CoreMiddleware, use make() instead of new.make() instead of new.Hyperf\Contract\OnMessageInterface and Hyperf\Contract\OnOpenInterface, use Swoole\WebSocket\Server instead of Swoole\Server.db:model to gen:model and added rewrite connection name visitor.Hyperf\JsonRpc\HttpServerFactory, Hyperf\HttpServer\ServerFactory, Hyperf\GrpcServer\ServerFactory.AsyncQueue::delay.Hyperf\Server\ServerInterface::SERVER_TCP, use Hyperf\Server\ServerInterface::SERVER_BASE to instead of it.Hyperf\Utils\Coroutine\Concurrent.$url for RingPHP Handlers.app and vendor, greatly decrease the elapsed time.null to the method of proxy class.eof to TCP response, according to the server configuration.Coroutine\Http2\Client->send failed.getReturnType failed, when the name is not equal of service.di:init-proxy) will connect to redis server and wait timeout.GrpcClientException, when BaseClient::start failed.-3;Hyperf\Grpc\Parser::parseResponse returns a non-standard error code for grpc.restoring and restored of trait SoftDeletes.read and write of Hyperf\Amqp\Connection\SwooleIO.redirect of Hyperf\HttpServer\Response.Hyperf\WebSocketServer\CoreMiddleware.Hyperf\Server\ServerInterface::SERVER_TCP as deprecated, will be removed in v1.1.download() method of Hyperf\HttpServer\Contract\ResponseInterface.fillable argument of Model when use refresh-fillable option, at the same time, the command will keep the fillable argument as default behaviours.app_name.Hyperf\Utils\Coroutine::parentId() static method in non-coroutine context will return null.Hyperf\Database\Schema\Schema.AuthController.vendor:publish command, if the destination folder exists, then will not repeatedly create the folder.Hyperf\Guzzle\CoroutineHandler does not support array parameter.Hyperf\HttpServer\HttpServerFactory, Hyperf\JsonRpc\HttpServerFactory, Hyperf\JsonRpc\TcpServerFactory as deprecated, will be removed in v1.1.Hyperf\Server\Listener\InitProcessTitleListener to init th process name, also added Hyperf\Framework\Event\OnStart and Hyperf\Framework\Event\OnManagerStart events.db:model does not works in MySQL 8.\Serializable, call serialize() and unserialize() functions failed.ExceptionHandler that user defined does not works, because the framework has handled the exception automatically.Hyperf\GrpcClient\BaseClient, and added default content-type application/grpc+proto to the Request object, also allows the grpc client that user-defined to override the buildRequest() method to create a new Request object.Hyperf\Contract\CompressInterface, will compress the job to a small object automatically.$enableCache is true.Collection and Model, if the object implemented Hyperf\Contract\CompressInterface, then the object could compress to a small one by call compress method.@var Object[] on the method.Hyperf\Contract\IdGeneratorInterfacehyperf/cache.make function accept index-based array as parameters.| Before | After |
|---|---|
| Hyperf\Database\Commands\Ast\ModelUpdateVistor | Hyperf\Database\Commands\Ast\ModelUpdateVisitor |
| Hyperf\Di\Aop\ProxyClassNameVistor | Hyperf\Di\Aop\ProxyClassNameVisitor |
| Hyperf\Di\Aop\ProxyCallVistor | Hyperf\Di\Aop\ProxyCallVisitor |
Hyperf\Tracer\Middleware\TraceMiddeware, only appears in openzipkin/zipkin v1.3.3+.ProviderConfig::load will convert a string to a array when the dependencies has the same key in deep merging.$key of method Arr::set not support int and null.$ttl in annotation Cacheable and CachePut into int.$default is not work in method Request::header.$key of method Arr::get not support int and null.RequestMapping::$methods, @RequestMapping(methods={"GET"}) and @RequestMapping(methods={RequestMapping::GET}) are available now.Hyperf\Utils\Contracts\Arrayable result of Request to Response automatically, and added text/plain content-type header for string Response.Hyperf\Contract\IdGeneratorInterface exist, the json-rpc client will generate a Request ID via IdGenerator automatically, and stored in Request attibute. Also added support for service register and health checks of jsonrpc TCP protocol.WorkerStrategy as the default crontab strategy.grpc-server and optimized code.go.$times of retry() function, means the retry times of the callable function.has() method of Hyperf\Di\Container, if pass a un-instantiable object (like an interface) to $container->has($interface), the method result is false now.ssl_key and cert of guzzle client does not work expected.hyperf/constants.$delay parameter for DriverInterface::push, and marked DriverInterface::delay method to deprecated.Router::addGroup.server property from Router options.enableCache to DefinitionSource to enable annotation cache.Model created by command db:model.hyperf/di, hyperf/command and hyperf/dispatcher.hyperf/websocket-server.db:model.creating, updating ... not work expected.flushContext not work expected for testing.