Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cache/src/CacheInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class_alias(Contract\Repository::class, CacheInterface::class);

if (false) { // @phpstan-ignore-line
/**
* @deprecated since v3.1, use `\FriendsOfHyperf\Cache\Contract\Repository` instead, will removed in v3.2
* @deprecated since v3.1, use `\FriendsOfHyperf\Cache\Contract\Repository` instead, will be removed in v3.2
*/
interface CacheInterface extends Contract\Repository
{
Expand Down
4 changes: 2 additions & 2 deletions src/cache/src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public function __invoke(): array
'dependencies' => [
Contract\Factory::class => fn ($container) => $container->get(CacheManager::class),
Contract\Repository::class => RepositoryFactory::class,
Contract\CacheInterface::class => fn ($container) => $container->get(Contract\Repository::class), // Will removed in v3.2
CacheInterface::class => fn ($container) => $container->get(Contract\Repository::class), // Will removed in v3.2
Contract\CacheInterface::class => fn ($container) => $container->get(Contract\Repository::class), // Will be removed in v3.2
CacheInterface::class => fn ($container) => $container->get(Contract\Repository::class), // Will be removed in v3.2
],
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/cache/src/Contract/CacheInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class_alias(Repository::class, CacheInterface::class);

if (false) { // @phpstan-ignore-line
/**
* @deprecated since v3.1, use `\FriendsOfHyperf\Cache\Contract\Repository` instead, will removed in v3.2
* @deprecated since v3.1, use `\FriendsOfHyperf\Cache\Contract\Repository` instead, will be removed in v3.2
*/
interface CacheInterface extends Repository
{
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/src/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ function dispatch($job, ...$arguments)
->getProducer((string) ($arguments[0] ?? 'default'))
->sendBatch([$job]),
class_exists(AsyncTask::class) && interface_exists(AsyncTaskInterface::class) && $job instanceof AsyncTaskInterface => AsyncTask::deliver($job, ...$arguments), // @deprecated since v3.1, will be removed in v3.2
default => throw new InvalidArgumentException('Not Support job type.')
default => throw new InvalidArgumentException('Unsupported job type.')
};
}

/**
* @param mixed $environments
* @return bool|Environment
* @deprecated since 3.1, use `Str::is($patterns, env('APP_ENV'))` instead, will removed in 3.2.
* @deprecated since 3.1, use `Str::is($patterns, env('APP_ENV'))` instead, will be removed in 3.2.
*/
function environment(...$environments)
{
Expand Down
24 changes: 24 additions & 0 deletions src/notification/src/Message/DatabaseMessage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);
/**
* This file is part of friendsofhyperf/components.
*
* @link https://github.com/friendsofhyperf/components
* @document https://github.com/friendsofhyperf/components/blob/main/README.md
* @contact huangdijia@gmail.com
*/

namespace FriendsOfHyperf\Notification\Message;

class DatabaseMessage
{
/**
* Create a new message instance.
* @param array $data the data that should be stored with the notification
*/
public function __construct(
public array $data
) {
}
}
13 changes: 4 additions & 9 deletions src/notification/src/Message/DatabaseMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@

namespace FriendsOfHyperf\Notification\Message;

class DatabaseMessages
/**
* @deprecated since v3.1, use `DatabaseMessage` instead. Will be removed in v3.2.
*/
class DatabaseMessages extends DatabaseMessage
{
/**
* Create a new message instance.
* @param array $data the data that should be stored with the notification
*/
public function __construct(
public array $data
) {
}
}
2 changes: 1 addition & 1 deletion src/recaptcha/src/ReCaptchaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function get(?string $version = null): ReCaptcha
}

if (! $this->config->has('recaptcha')) {
throw new RuntimeException('Not publish yet, please run \'php bin/hyperf.php vendor:publish friendsofhyperf/recaptcha\'');
throw new RuntimeException('Configuration not published yet, please run \'php bin/hyperf.php vendor:publish friendsofhyperf/recaptcha\'.');
}

$version ??= (string) $this->config->get('recaptcha.default', 'v3');
Expand Down
2 changes: 1 addition & 1 deletion src/support/src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @method bool isDevelop()
* @method bool isProduction()
* @method bool isOnline()
* @deprecated since 3.1, use `Str::is($patterns, env('APP_ENV'))` instead, will removed in 3.2.
* @deprecated since 3.1, use `Str::is($patterns, env('APP_ENV'))` instead, will be removed in 3.2.
*/
class Environment
{
Expand Down
2 changes: 1 addition & 1 deletion src/support/src/Once/Backtrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace FriendsOfHyperf\Support\Once;

/**
* @deprecated since v3.1, use FriendsOfHyperf\Support\Onceable instead, will removed in v3.2
* @deprecated since v3.1, use FriendsOfHyperf\Support\Onceable instead, will be removed in v3.2
*/
class Backtrace
{
Expand Down
2 changes: 1 addition & 1 deletion src/support/src/Once/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use WeakMap;

/**
* @deprecated since v3.1, use FriendsOfHyperf\Support\Once instead, will removed in v3.2
* @deprecated since v3.1, use FriendsOfHyperf\Support\Once instead, will be removed in v3.2
*/
class Cache implements Countable
{
Expand Down
4 changes: 4 additions & 0 deletions src/telescope/src/EntryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class EntryType

public const REQUEST = 'request';

/**
* Alias for SCHEDULE; kept for backward compatibility.
* @deprecated Use EntryType::SCHEDULE instead. Will be removed in v3.2.
*/
public const SCHEDULED_TASK = 'schedule';

public const GATE = 'gate';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

namespace FriendsOfHyperf\Tests\Notification\Stubs;

use FriendsOfHyperf\Notification\Message\DatabaseMessages;
use FriendsOfHyperf\Notification\Message\DatabaseMessage;
use FriendsOfHyperf\Notification\Notification;

class NotificationDatabaseChannelCustomizeTypeTestNotification extends Notification
{
public function toDatabase($notifiable): DatabaseMessages
public function toDatabase($notifiable): DatabaseMessage
{
return new DatabaseMessages([
return new DatabaseMessage([
'invoice_id' => 1,
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

namespace FriendsOfHyperf\Tests\Notification\Stubs;

use FriendsOfHyperf\Notification\Message\DatabaseMessages;
use FriendsOfHyperf\Notification\Message\DatabaseMessage;
use FriendsOfHyperf\Notification\Notification;

class NotificationDatabaseChannelTestNotification extends Notification
{
public function toDatabase($notifiable): DatabaseMessages
public function toDatabase($notifiable): DatabaseMessage
{
return new DatabaseMessages([
return new DatabaseMessage([
'message' => 'Hello World',
]);
}
Expand Down