CHANGELOG-2.0.md
hyperf/database.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.throwbale 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.