diff --git a/src/cache/src/CacheInterface.php b/src/cache/src/CacheInterface.php index d3dab20ca..3ec39080d 100644 --- a/src/cache/src/CacheInterface.php +++ b/src/cache/src/CacheInterface.php @@ -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 { diff --git a/src/cache/src/ConfigProvider.php b/src/cache/src/ConfigProvider.php index 5ca93a45e..478385df4 100644 --- a/src/cache/src/ConfigProvider.php +++ b/src/cache/src/ConfigProvider.php @@ -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 ], ]; } diff --git a/src/cache/src/Contract/CacheInterface.php b/src/cache/src/Contract/CacheInterface.php index 975f53659..7ec519f78 100644 --- a/src/cache/src/Contract/CacheInterface.php +++ b/src/cache/src/Contract/CacheInterface.php @@ -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 { diff --git a/src/helpers/src/Functions.php b/src/helpers/src/Functions.php index 28f3c1e52..9f9703f93 100644 --- a/src/helpers/src/Functions.php +++ b/src/helpers/src/Functions.php @@ -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) { diff --git a/src/notification/src/Message/DatabaseMessage.php b/src/notification/src/Message/DatabaseMessage.php new file mode 100644 index 000000000..aa17b6ab6 --- /dev/null +++ b/src/notification/src/Message/DatabaseMessage.php @@ -0,0 +1,24 @@ +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'); diff --git a/src/support/src/Environment.php b/src/support/src/Environment.php index 1fc955f6d..c2cf62ecd 100644 --- a/src/support/src/Environment.php +++ b/src/support/src/Environment.php @@ -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 { diff --git a/src/support/src/Once/Backtrace.php b/src/support/src/Once/Backtrace.php index 7d53c34ed..ae58a92f5 100644 --- a/src/support/src/Once/Backtrace.php +++ b/src/support/src/Once/Backtrace.php @@ -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 { diff --git a/src/support/src/Once/Cache.php b/src/support/src/Once/Cache.php index 132829830..e3b17f4a1 100644 --- a/src/support/src/Once/Cache.php +++ b/src/support/src/Once/Cache.php @@ -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 { diff --git a/src/telescope/src/EntryType.php b/src/telescope/src/EntryType.php index b3eea41d3..c77c2fc97 100644 --- a/src/telescope/src/EntryType.php +++ b/src/telescope/src/EntryType.php @@ -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'; diff --git a/tests/Notification/Stubs/NotificationDatabaseChannelCustomizeTypeTestNotification.php b/tests/Notification/Stubs/NotificationDatabaseChannelCustomizeTypeTestNotification.php index afb6d1567..030ad0799 100644 --- a/tests/Notification/Stubs/NotificationDatabaseChannelCustomizeTypeTestNotification.php +++ b/tests/Notification/Stubs/NotificationDatabaseChannelCustomizeTypeTestNotification.php @@ -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, ]); } diff --git a/tests/Notification/Stubs/NotificationDatabaseChannelTestNotification.php b/tests/Notification/Stubs/NotificationDatabaseChannelTestNotification.php index 67770d50a..0efe5b5b5 100644 --- a/tests/Notification/Stubs/NotificationDatabaseChannelTestNotification.php +++ b/tests/Notification/Stubs/NotificationDatabaseChannelTestNotification.php @@ -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', ]); }