From 7f1d3f03310c456ddac0dfa002469800add92b40 Mon Sep 17 00:00:00 2001 From: wayhood Date: Sat, 2 Dec 2023 12:43:17 +0800 Subject: [PATCH 1/5] add 3.1 --- composer.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index f6453de..24fcca5 100644 --- a/composer.json +++ b/composer.json @@ -25,19 +25,19 @@ } }, "require": { - "php": ">=8.0", + "php": ">=8.1", "ext-fileinfo": "*", "ext-imagick": "*", - "ext-swoole": ">=4.8", - "hyperf-ext/encryption": "dev-master", - "hyperf/cache": "~3.0.0", - "hyperf/di": "~3.0.0", - "hyperf/framework": "~3.0.0", - "hyperf/validation": "~3.0.0" + "ext-swoole": ">=5.0", + "hyperf-ext/encryption": "3.1", + "hyperf/cache": "~3.1.0", + "hyperf/di": "~3.1.0", + "hyperf/framework": "~3.1.0", + "hyperf/validation": "~3.1.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.0", - "hyperf/testing": "~3.0.0", + "hyperf/testing": "~3.1.0", "phpstan/phpstan": "^1.0", "swoole/ide-helper": "^5.0" }, -- Gitee From 8a62fad71cd535677b169c054e99c6467e0bec07 Mon Sep 17 00:00:00 2001 From: wayhood Date: Sat, 2 Dec 2023 12:47:13 +0800 Subject: [PATCH 2/5] fix --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 24fcca5..6e28fcd 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "ext-fileinfo": "*", "ext-imagick": "*", "ext-swoole": ">=5.0", - "hyperf-ext/encryption": "3.1", + "hyperf-ext/encryption": "3.1.x-dev", "hyperf/cache": "~3.1.0", "hyperf/di": "~3.1.0", "hyperf/framework": "~3.1.0", -- Gitee From dbe1cc4c208e26eaa4f425e7805e1067fa914516 Mon Sep 17 00:00:00 2001 From: wayhood Date: Sat, 2 Dec 2023 14:52:45 +0800 Subject: [PATCH 3/5] fix --- publish/captcha.php | 2 ++ src/Captcha.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/publish/captcha.php b/publish/captcha.php index 3410391..8e8c85a 100644 --- a/publish/captcha.php +++ b/publish/captcha.php @@ -8,6 +8,8 @@ declare(strict_types=1); * @contact eric@zhu.email * @license https://github.com/hyperf-ext/captcha/blob/master/LICENSE */ +use function Hyperf\Support\env; + return [ 'fonts_dir' => BASE_PATH . '/storage/fonts', 'encryption_driver' => env('CAPTCHA_ENCRYPTION_DRIVER', 'aes'), diff --git a/src/Captcha.php b/src/Captcha.php index c3e1be2..7ec1174 100644 --- a/src/Captcha.php +++ b/src/Captcha.php @@ -11,7 +11,7 @@ declare(strict_types=1); namespace HyperfExt\Captcha; use Carbon\Carbon; -use Hyperf\Utils\Contracts\Arrayable; +use Hyperf\Contract\Arrayable; class Captcha implements Arrayable { -- Gitee From a9befe71c7e696bcecfe61f9da014aca4f209eba Mon Sep 17 00:00:00 2001 From: wayhood Date: Sat, 2 Dec 2023 17:29:09 +0800 Subject: [PATCH 4/5] fix --- src/Listener/ValidatorFactoryResolvedListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Listener/ValidatorFactoryResolvedListener.php b/src/Listener/ValidatorFactoryResolvedListener.php index 4546c13..7b41550 100644 --- a/src/Listener/ValidatorFactoryResolvedListener.php +++ b/src/Listener/ValidatorFactoryResolvedListener.php @@ -11,7 +11,7 @@ declare(strict_types=1); namespace HyperfExt\Captcha\Listener; use Hyperf\Event\Contract\ListenerInterface; -use Hyperf\Utils\ApplicationContext; +use Hyperf\Context\ApplicationContext; use Hyperf\Validation\Event\ValidatorFactoryResolved; use HyperfExt\Captcha\CaptchaFactory; -- Gitee From 5d8e43690e4f7bbec8d38ce750c53115b034e078 Mon Sep 17 00:00:00 2001 From: wayhood Date: Sat, 2 Dec 2023 09:58:55 +0000 Subject: [PATCH 5/5] update README.md. Signed-off-by: wayhood --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 969635b..e6d1129 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ php bin/hyperf.php vendor:publish hyperf/cache ## 使用 ```php -use Hyperf\Utils\ApplicationContext; +use Hyperf\Context\ApplicationContext; use HyperfExt\Captcha\CaptchaFactory; $captchaFactory = ApplicationContext::getContainer()->get(CaptchaFactory::class); -- Gitee