You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The framework removes @Annotation support, and uses PHP8 native annotation Attribute. Before updating, be sure to check whether the project has been replaced by Attribute.
The following script can be executed to convert Doctrine Annotations to PHP8 Attributes.
Note: This script can only be executed under version 2.2
The framework adds more type restrictions to the class library, so when updating from 2.2 to 3.0, you need to run a static check to make sure it is works.
composer analysis
The framework modifies the Http status returned by gRPC Server according to the gRPC specification. It is fixed at 200, and gRPC Server returns the corresponding status code. Service upgrade to version 3.x
Dependencies Upgrade
Upgraded php-amqplib/php-amqplib to ^3.1;
Upgraded phpstan/phpstan to ^1.0;
Upgraded mix/redis-subscribe to mix/redis-subscriber:^3.0
Upgraded psr/simple-cache to ^1.0|^2.0|^3.0
Upgraded monolog/monolog to ^2.7|^3.1
Upgraded league/flysystem to ^1.0|^2.0|^3.0
Added
#4196 Added Hyperf\Amqp\IO\IOFactory which used to create amqp io by yourself.
#4304 Support $suffix for trait Hyperf\Utils\Traits\StaticInstance.
#4400 Added $description which used to set command description easily for Hyperf\Command\Command.
#4277 Added Hyperf\Utils\IPReader to get local IP.
#4497 Added Hyperf\Coordinator\Timer which can be stopped safely.
#4523 Support callback conditions for Conditionable::when() and Conditionable::unless().
#4663 Make Hyperf\Utils\Stringable implements Stringable.
#4700 Support coroutine style server for socketio-server.
#4852 Added NullDisableEventDispatcher to disable event dispatcher by default.
#4866#4869 Added Annotation Scene which use scene in FormRequest easily.
#4908 Added Db::beforeExecuting() to register a hook which to be run just before a database query is executed.
#4909 Added ConsumerMessageInterface::getNums() to change the number of amqp consumer by dynamically.
#4918 Added LoadBalancerInterface::afterRefreshed() to register a hook which to be run after refresh nodes.
#4992 Added config amqp.enable which used to control amqp consumer whether to start automatically and producer whether to declare automatically.
#4994#5016 Added component hyperf/database-pgsql which you can be used to connect pgsql server.
#5007 Support for SSL encrypted connection to Redis.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
^8.0
for all components;BC breaks
@Annotation
support, and usesPHP8
native annotationAttribute
. Before updating, be sure to check whether the project has been replaced byAttribute
.The following script can be executed to convert
Doctrine Annotations
toPHP8 Attributes
.Note: This script can only be executed under version 2.2
composer require hyperf/code-generator php vendor/bin/regenerate-models.php $PWD/app/Model
2.2
to3.0
, you need to run a static check to make sure it is works.Http status
returned bygRPC Server
according to thegRPC
specification. It is fixed at 200, andgRPC Server
returns the correspondingstatus code
. Service upgrade to version 3.xDependencies Upgrade
php-amqplib/php-amqplib
to^3.1
;phpstan/phpstan
to^1.0
;mix/redis-subscribe
tomix/redis-subscriber:^3.0
psr/simple-cache
to^1.0|^2.0|^3.0
monolog/monolog
to^2.7|^3.1
league/flysystem
to^1.0|^2.0|^3.0
Added
Hyperf\Amqp\IO\IOFactory
which used to create amqp io by yourself.$suffix
for traitHyperf\Utils\Traits\StaticInstance
.$description
which used to set command description easily forHyperf\Command\Command
.Hyperf\Utils\IPReader
to get local IP.Hyperf\Coordinator\Timer
which can be stopped safely.Conditionable::when()
andConditionable::unless()
.Hyperf\Utils\Stringable
implementsStringable
.socketio-server
.NullDisableEventDispatcher
to disable event dispatcher by default.Scene
which use scene in FormRequest easily.Db::beforeExecuting()
to register a hook which to be run just before a database query is executed.ConsumerMessageInterface::getNums()
to change the number of amqp consumer by dynamically.LoadBalancerInterface::afterRefreshed()
to register a hook which to be run after refresh nodes.amqp.enable
which used to control amqp consumer whether to start automatically and producer whether to declare automatically.hyperf/database-pgsql
which you can be used to connect pgsql server.Hyperf\Database\Model\Concerns\HasAttributes::getRawOriginal()
.symfony.event.enable
to control whether to useSymfonyEventDispatcher
.Pipeline::thenReturn()
method to run pipes and return the result$dictionary
forStr::slug
, your can rewrite some tags easily.config
for commandserver:watch
.CacheAhead
which used to cache data ahead.Hyperf\WebSocketServer\Sender::getResponses()
.defer_release
config inhyperf/db
ext-posix
forwatcher
.Optimized
http://xxx.com/yyy/
instead ofhttp://xxx.com:8848/
to connectnacos
.DataFormatterInterface
which uses object instead of array as inputs.Str::contains
Str::startsWith
andStr::endsWith
based onPHP8
.Hyperf\Context\Context
which supportcoroutineId
forset()
override()
andgetOrSet()
.Hyperf\Utils\Str
whose methodspadBoth
padLeft
andpadRight
supportmultibyte
.SafeCaller
to avoid server shutdown which caused by exceptions.Redis::isConnected()
, because it could be connected defer or reconnected after disconnected.wait
instead ofparallel
for coroutine style tcp server.ignoreAnnotations
forAnnotation Reader
.Hyperf\Di\ClassLoader::$proxies
, because merge it intoComposer\Autoload\ClassLoader::$classMap
.Hyperf\Database\Model\Concerns\HasEvents::fireModelEvent()
.call()
fromCoroutine::create()
.Hyperf\Di\ClassLoader
and OptimizedComposer::getLoader()
.ConfirmableTrait
, such asmigrate
command.socketio-server
.call()
fromcallable function
.defer
by default.Changed
public
property$message
toprotected
forHyperf\AsyncQueue\Event\Event
.$circularDependences
to$checkCircularDependencies
forDag
.hyperf/coordinator
fromhyperf/utils
.0
from1
.Hyperf\Kafka\Exception\ConnectionCLosedException
toHyperf\Kafka\Exception\ConnectionClosedException
.Hyperf\Database\Model\Builder::insertOrIgnore
will be return affected count.null
forHyperf\DbConnection\Db::__connection()
.??
instead of?:
for$callback
when usingStringable::when()
.Hyperf\Engine\Channel
instead ofHyperf\Coroutine\Channel
inhyperf/reactive-x
.void
forHyperf\Event\Contract\ListenerInterface::process()
.PHP
>=8.0
.ProcessManager
when server shutdown.$value.timeout
to$options.timeout
forCircuitBreaker
.AnnotationManager::getFormatedKey()
toAnnotationManager::getFormattedKey()
.NoNodesAvailableException
when cannot select any node from load balancer.settings.pid_file
is null when using swow server.hyperf/devtool
or set them inautoload/commands
.Trace Annotation
, because don't support array.Hyperf\Framework\SymfonyEventDispatcher
by default, if you listen symfony events, you must opensymfony.event.enable
.(string) $throwable
instead ofsprintf
forHyperf\ExceptionHandler\Formatter\FormatterInterface::format()
.Jsonable
andXmlable
tocontract
fromutils
.MessageBag
andMessageProvider
tocontract
fromutils
.$server
inHyperf\WebSocketServer\Server::deferOnOpen()
tomixed
.chunkById
but the column is not existed.Swow Supported
hyperf/amqp
.Hyperf\Utils\Coroutine\Locker
.Hyperf\Utils\WaitGroup
.Swoole\Coroutine\Channel
byHyperf\Engine\Channel
for all components.hyperf/websocket-server
.hyperf/load-balancer
.hyperf/server
.hyperf/retry
.hyperf/pool
.hyperf/crontab
.hyperf/nsq
.hyperf/signal
.Removed
Hyperf\AsyncQueue\Signal\DriverStopHandler
.Hyperf\Utils\Resource
.Hyperf\Utils\Context
, please useHyperf\Context\Context
instead.hyperf/filesystem
.doctrine/annotations
, please usePHP8 Attributes
.WARNING
log message when amqp connection restart.Deprecated
Hyperf\Utils\Contracts\Arrayable
will be deprecated, please useHyperf\Contract\Arrayable
instead.Hyperf\AsyncQueue\Message
will be deprecated, please useHyperf\AsyncQueue\JobMessage
instead.Hyperf\Di\Container::getDefinitionSource()
will be deprecated.Fixed
PhpParser::getExprFromValue()
does not support assoc array.$description
and$signature
forhyperf/command
.socket-io
client always reconnect when using coroutine style server.ProxyTrait::__getParamsMap
can not work when using trait alias.RedisAdapter::mixSubscribe
cannot work cased by redis prefix when usingsocketio-server
.ComponentTagCompiler::escapeSingleQuotesOutsideOfPhpBlocks()
cannot work.Swow
.rpc-multiplex
.//foo
) when the routing prefix is end of '/'.Parallel
.continue
cannot work when usingview-engine
.pgsql
.Request::parseHost
does not work when host is invalid.RedisSentinel
can't support empty password.PGSqlSwooleConnection::affectingStatement()
can't work when thesql
is wrong.KeepaliveConnection::isTimeout()
can't work when using swow.di
.This discussion was created from the release Release v3.0.0.
Beta Was this translation helpful? Give feedback.
All reactions