Dependencies Upgrade
- Upgrade the php version to
>=8.1 - Upgrade the swoole version to
>=5.0 - Upgrade
hyperf/engineto^2.0 - Upgrade
phpunit/phpunitto^10.0
Swow Supported
Added
- Support Psr7Plus.
- Support pest.
- Added
hyperf/helpercomponent. - Added
hyperf/polyfill-coroutinecomponent. - #5815 Added alias as
mysqlforpdoinhyperf/db. - #5849 Support for insert update and select using enums.
- #5894 #5897 Added
model-factorysupport forhyperf/testing. - #5898 Added
toRawSql()to Query Builders. - #5906 Added
getRawQueryLog()to Database Connection. - #5915 Added
data_forgethelper. - #5914 Added
Str::isUrl()and use it from the validator. - #5918 Added
Arr::isList()method. - #5925 #5926 Allow model attributes to be casted to/from an Enum.
- #5930 #5934 Added
AsCommandannotation andClosureCommandsupport. - #5950 Added
Job::setMaxAttemptsmethod anddispatchhelper function forhyperf/async-queue. - #5967 Added component
hyperf/migration-generatorwhich used to generate migrations from databases. - #5983 #5985 Added
skipCacheResultsto annotations ofhyperf/cache. - #5994 Added
eventsofcrontablifecycle. - #6039 Support semantic crontab rules.
- #6082 Added
hyperf/stdlibcomponent. - #6085 Added an error count to the database connection to ensure that the connection can be reset when occur too many exceptions.
- #6106 Support some validation rules.
- #6124 Added
Hyperf\AsyncQueue\Job::fail(). - #6259 Support to use model builder as the column in
Hyperf\Database\Query\Builder\addSelect. - #6301 Improve storage switcher for rate-limit.
- #6338 Added config
processorsfor swagger.
Optimized
- Move Prometheus driver dependency to suggest.
- #5586 Support grpc streaming for nacos naming service.
- #5866 Use
StrCacheinstead ofStrin special cases. - #5872 Avoid to execute the refresh callback more than once when calling
refresh()multi times. - #5879 #5878 Improve
Command. - #5901 Optimized code for identifer established by the rpc client that must contain a string,number or null if included.
- #5905 Forget with collections.
- #5917 Upgrade URL pattern for
Str::isUrl(). - #5920 add the
\Stringableinterface to classes that have__toString()method. - #5945 Don't sync config frequently when listen more than one namespace for apollo config center.
- #5948 Optimized
Hyperf\Coroutine\Locker. - #5960 Allowed set poolName in Annotation.
- #5972
Collection::except()with null returns all. - #5973 Simplified the handlers definition of logger.
- #6010 Throw exception when cast class is not existed.
- #6030 Support buffer mechanism in standalone process of metric.
- #6131 Throw invalid argument exception when the crontab task is
null. - #6172 Optimized
ProcessManagerto make therunningstatus more clear. - #6184 Set logger when using safe socket in coroutine style tcp server.
- #6247 Optimized code that you can get request from
BadRequestHttpException.
Removed
- Remove unused codes in
hyperf/utils. - Remove redundant
setAccessiblemethods. - Remove deprecated codes.
- #5813 Removed support for swoole 4.x
- #5859 Removed string cache from
Hyperf\Stringable\Str - #6040 Removed some deprecated methods from
Hyperf\Di\Annotation\AbstractAnnotation. - #6043 Removed deprecated
Hyperf\Coroutine\Traits\Container. - #6244 Removed deprecated component
swoole-tracker.
Changed
- Throw exceptions when the redis option key is invalid.
- #5847 Changed the default redis key for metric.
- #5943 Don't remove the node from load balancer of
json rpc http transporterwhen the status code isn't 200. - #5961 Using
enuminstead ofclassforHyperf\Amqp\ResultandHyperf\Amqp\Message\Type. - #6022 When using
Base62::decodeto decode the incorrect data, it should be thrownInvalidArgumentExceptioninstead ofTypeError. - #6128 When using multi-level directories for
hyperf/config, you can useconfig('a.c')to get the configurations fromautoload/a/c.php.
Fixed
- #5771 Fixed bug that the return type of
Model::updateOrInsertisn't boolean. - #6033 Fixed bug that
RequestContextandResponseContextcannot get instance from another coroutines. - #6056 Fixed bug that
Hyperf\HttpServer\Request::hasFile()don't supportSwow. - #6260 Fixed bug that logger cannot work in
LoadBalancerInterface::refresh().
Deprecated
Hyperf\DB\PgSQL\PgSQLConnection::str_replace_oncewill be deprecated, please useHyperf\DB\PgSQL\PgSQLConnection::strReplaceOnceinstead.Hyperf\Database\PgSQL\PostgreSqlSwooleExtConnection::str_replace_oncewill be deprecated, please useHyperf\Database\PgSQL\PostgreSqlSwooleExtConnection::strReplaceOnceinstead.
New Contributors
- @BinaryAlan made their first contribution in #5799
- @szutoutou made their first contribution in #5771
- @gokure made their first contribution in #5829
- @LTaooo made their first contribution in #5854
- @ganey made their first contribution in #5881
- @pudongping made their first contribution in #5870
- @iamrameffort made their first contribution in #5895
- @MorriosL made their first contribution in #5900
- @fengyikang88 made their first contribution in #5922
- @binaryfire made their first contribution in #5951
- @gaichao168 made their first contribution in #6001
- @onekb made their first contribution in #6017
- @luck-xj made their first contribution in #6114
- @bafeiyu made their first contribution in #6160
- @dxkrs made their first contribution in #6235
- @Hanmo123 made their first contribution in #6279
- @675076143 made their first contribution in #6293
- @sorshion made their first contribution in #6307
- @codesway made their first contribution in #6321
Full Changelog: v3.0.46...v3.1.0