docs/en/changelog/1.1.md
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.