docs/en/changelog/3.2.md
The BC of Carbon component
Carbon::createFromTimestamp() don't read the default timezone by date_default_timezone_get() for v3.0.Carbon::diffInDays() no longer returns an absolute value by default. Use the $absolute parameter to control whether the result is absolute.#7625 Renamed JobInterface::getQueueName() to getPoolName() in async-queue component for terminology consistency.
<?php
// Before
class CustomJob extends \Hyperf\AsyncQueue\Job
{
public function getQueueName(): string
{
return 'custom';
}
}
// After
class CustomJob extends \Hyperf\AsyncQueue\Job
{
public function getPoolName(): string
{
return 'custom';
}
}
<?php
use Carbon\Carbon;
$t = time();
# The break usage
Carbon::createFromTimestamp($t, date_default_timezone_get());
# The correct usage
Carbon::createFromTimestamp($t, date_default_timezone_get());
logger configuration structure has been changed. Please refer to #7563.<?php
// Before
return [
'default' => [
'driver' => 'daily',
'path' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => env('LOG_LEVEL', 'debug'),
'days' => 7,
],
];
// After
return [
'default' => 'default',
'channels' => [
'default' => [
'driver' => 'daily',
'path' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => env('LOG_LEVEL', 'debug'),
'days' => 7,
],
// Add your custom channels here
],
];
cache configuration structure has been changed. Please refer to #7594.<?php
// Before
return [
'default' => [
'driver' => RedisDriver::class,
'packer' => PhpSerializerPacker::class,
'prefix' => 'c:',
],
];
// After
return [
'default' => env('CACHE_DRIVER', 'default'),
'stores' => [
'default' => [
'driver' => RedisDriver::class,
'packer' => PhpSerializerPacker::class,
'prefix' => 'c:',
],
],
];
swow.config/autoload/dependencies.php
<?php
use Hyperf\Contract\ResponseEmitterInterface;
use Hyperf\Engine\ResponseEmitter;
return [
ResponseEmitterInterface::class => ResponseEmitter::class,
];
fgetcsv and fputcsv methods now require providing a default value for the escape parameter.fputcsv($fp, $fields) must be changed to fputcsv($fp, $fields, escape: '')
fgetcsv($fp) must be changed to fgetcsv($fp, escape: '')
>=8.2elasticsearch/elasticsearch version to ^8.0 || ^9.0nikic/php-parser version to 5.6symfony/* components to ^6.0 || ^7.0phpunit/phpunit version to ^11.0google/protobuf to ^3.6.1 || ^4.2.guzzlehttp/guzzle to ^7.0.laminas/laminas-mime package.Hyperf\Serializer\Contract\CacheableSupportsMethodInterface interface.Hyperf\AsyncQueue\JobMessage serialization.ResumeExitCoordinatorListener, SocketIO Future flag parameter, and WebSocket HandeShakeException typo alias.Hyperf\Di\ReflectionManager::getAllClassesByFinder().toCssClasses and toCssStyles methods by directly using the input array to simplify the code logic.Parser::parseResponse return value format by replacing Grpc\StringifyAble with Google\Rpc\Status objects for better standardization and code readability.job.v3.0 for nesbot/carbon.toJson method to Hyperf\Contract\Jsonable.QueryException.8.x.9.x.Hyperf\Support\Fluent.Hyperf\Pipeline\Pipeline::finally().shift() and pop() in Hyperf\Collection\Collection.partition() and reject() to Hyperf\Collection\Arr.Macroable support to Hyperf\Context\Context.NonCoroutine attribute for flexible test execution control.config/autoload/processes.php.StdoutLogger output format.database-sqlserver.deleted_at to datetime for hyperf/database.Hyperf\Database\Query\Builder::limit().escape for function str_getcsv.influxdb/influxdb-php into influxdata/influxdb-client-php.logger configuration structure.cache configuration structure.$queue property to $pool in ConsumerProcess for async-queue component.getQueueName() to getPoolName() in async-queue component for terminology consistency.sortByMany() don't return the same result like sortBy().