代码拉取完成,页面将自动刷新
同步操作将从 hyperf/hyperf 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
^8.0
for all components;@Annotation
的支持,全部使用 PHP8
原生注解 Attribute
,更新前务必检查项目中,是否已经全部替换为 Attribute
。可以执行以下脚本,将 Doctrine Annotations
转化为 PHP8 Attributes
.
注意: 这个脚本只能在 2.2 版本下执行
composer require hyperf/code-generator
php bin/hyperf.php code:generate -D app
因为模型基类增加了成员变量的类型支持,所以需要使用以下脚本,将其升级为新版本。
composer require hyperf/code-generator
php vendor/bin/regenerate-models.php $PWD/app/Model
2.2
更新到 3.0
版本时,需要跑一遍静态检测。composer analyse
GRPC
规范修改了 GRPC Server
返回的 Http status
固定为为 200, GRPC Server
返回对应的 status code
,更新前如果有使用 GRPC
,请务必将相关的服务升级到 3.x 版本php-amqplib/php-amqplib
to ^3.1
;phpstan/phpstan
to ^1.0
;mix/redis-subscribe
to mix/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
Hyperf\Amqp\IO\IOFactory
which used to create amqp io by yourself.$suffix
for trait Hyperf\Utils\Traits\StaticInstance
.$description
which used to set command description easily for Hyperf\Command\Command
.Hyperf\Utils\IPReader
to get local IP.Hyperf\Coordinator\Timer
which can be stopped safely.Conditionable::when()
and Conditionable::unless()
.Hyperf\Utils\Stringable
implements Stringable
.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 use SymfonyEventDispatcher
.Pipeline::thenReturn()
method to run pipes and return the result$dictionary
for Str::slug
, your can rewrite some tags easily.config
for command server:watch
.http://xxx.com/yyy/
instead of http://xxx.com:8848/
to connect nacos
.DataFormatterInterface
which uses object instead of array as inputs.Str::contains
Str::startsWith
and Str::endsWith
based on PHP8
.Hyperf\Context\Context
which support coroutineId
for set()
override()
and getOrSet()
.Hyperf\Utils\Str
whose methods padBoth
padLeft
and padRight
support multibyte
.SafeCaller
to avoid server shutdown which caused by exceptions.Redis::isConnected()
, because it could be connected defer or reconnected after disconnected.wait
instead of parallel
for coroutine style tcp server.ignoreAnnotations
for Annotation Reader
.Hyperf\Di\ClassLoader::$proxies
, because merge it into Composer\Autoload\ClassLoader::$classMap
.Hyperf\Database\Model\Concerns\HasEvents::fireModelEvent()
.call()
from Coroutine::create()
.Hyperf\Di\ClassLoader
and Optimized Composer::getLoader()
.ConfirmableTrait
, such as migrate
command.socketio-server
.call()
from callable function
.defer
by default.public
property $message
to protected
for Hyperf\AsyncQueue\Event\Event
.$circularDependences
to $checkCircularDependencies
for Dag
.hyperf/coordinator
from hyperf/utils
.0
from 1
.Hyperf\Kafka\Exception\ConnectionCLosedException
to Hyperf\Kafka\Exception\ConnectionClosedException
.Hyperf\Database\Model\Builder::insertOrIgnore
will be return affected count.null
for Hyperf\DbConnection\Db::__connection()
.??
instead of ?:
for $callback
when using Stringable::when()
.Hyperf\Engine\Channel
instead of Hyperf\Coroutine\Channel
in hyperf/reactive-x
.void
for Hyperf\Event\Contract\ListenerInterface::process()
.PHP
>= 8.0
.ProcessManager
when server shutdown.$value.timeout
to $options.timeout
for CircuitBreaker
.AnnotationManager::getFormatedKey()
to AnnotationManager::getFormattedKey()
.NoNodesAvailableException
when cannot select any node from load balancer.settings.pid_file
is null when using swow server.hyperf/devtool
or set them in autoload/commands
.Trace Annotation
, because don't support array.Hyperf\Framework\SymfonyEventDispatcher
by default, if you listen symfony events, you must open symfony.event.enable
.(string) $throwable
instead of sprintf
for Hyperf\ExceptionHandler\Formatter\FormatterInterface::format()
.Jsonable
and Xmlable
to contract
from utils
.MessageBag
and MessageProvider
to contract
from utils
.$server
in Hyperf\WebSocketServer\Server::deferOnOpen()
to mixed
.hyperf/amqp
.Hyperf\Utils\Coroutine\Locker
.Hyperf\Utils\WaitGroup
.Swoole\Coroutine\Channel
by Hyperf\Engine\Channel
for all components.hyperf/websocket-server
.hyperf/load-balancer
.hyperf/server
.hyperf/retry
.hyperf/pool
.hyperf/crontab
.hyperf/nsq
.hyperf/signal
.Hyperf\AsyncQueue\Signal\DriverStopHandler
.Hyperf\Utils\Resource
.Hyperf\Utils\Context
, please use Hyperf\Context\Context
instead.hyperf/filesystem
.doctrine/annotations
, please use PHP8 Attributes
.Hyperf\Utils\Contracts\Arrayable
will be deprecated, please use Hyperf\Contract\Arrayable
instead.Hyperf\AsyncQueue\Message
will be deprecated, please use Hyperf\AsyncQueue\JobMessage
instead.Hyperf\Di\Container::getDefinitionSource()
will be deprecated.PhpParser::getExprFromValue()
does not support assoc array.$description
and $signature
for hyperf/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 using socketio-server
.ComponentTagCompiler::escapeSingleQuotesOutsideOfPhpBlocks()
cannot work.Swow
.rpc-multiplex
.//foo
) when the routing prefix is end of '/'.Parallel
.continue
cannot work when using view-engine
.pgsql
.RedisSentinel
can't support empty password.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。