From d7b5ed58442c02fb7bfeb8db7e883558449536f5 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Sat, 15 Nov 2025 19:52:55 +0800 Subject: [PATCH] Remove pest-plugin-hyperf component This commit removes the pest-plugin-hyperf component from the monorepo, including: - Component source code and configuration files - Documentation in all languages (en, zh-cn, zh-hk, zh-tw) - Sidebar references across all language versions - Composer.json autoload and require entries - Component list in README files --- composer.json | 4 +- docs/.vitepress/src/en/sidebars.ts | 4 - docs/.vitepress/src/zh-cn/sidebars.ts | 4 - docs/.vitepress/src/zh-hk/sidebars.ts | 4 - docs/.vitepress/src/zh-tw/sidebars.ts | 4 - docs/en/components/pest-plugin-hyperf.md | 37 ------- docs/zh-cn/components/pest-plugin-hyperf.md | 37 ------- docs/zh-cn/guide/start/components.md | 1 - docs/zh-hk/components/pest-plugin-hyperf.md | 37 ------- docs/zh-hk/guide/start/components.md | 1 - docs/zh-tw/components/pest-plugin-hyperf.md | 37 ------- docs/zh-tw/guide/start/components.md | 1 - src/.github/profile/README.md | 1 - src/pest-plugin-hyperf/.gitattributes | 4 - src/pest-plugin-hyperf/.github/FUNDING.yml | 2 - .../.github/workflows/close-pull-request.yml | 9 -- .../.github/workflows/release.yaml | 10 -- src/pest-plugin-hyperf/LICENSE | 21 ---- src/pest-plugin-hyperf/README.md | 50 --------- src/pest-plugin-hyperf/composer.json | 56 ---------- src/pest-plugin-hyperf/src/Plugin.php | 100 ------------------ 21 files changed, 1 insertion(+), 423 deletions(-) delete mode 100644 docs/en/components/pest-plugin-hyperf.md delete mode 100644 docs/zh-cn/components/pest-plugin-hyperf.md delete mode 100644 docs/zh-hk/components/pest-plugin-hyperf.md delete mode 100644 docs/zh-tw/components/pest-plugin-hyperf.md delete mode 100644 src/pest-plugin-hyperf/.gitattributes delete mode 100644 src/pest-plugin-hyperf/.github/FUNDING.yml delete mode 100644 src/pest-plugin-hyperf/.github/workflows/close-pull-request.yml delete mode 100644 src/pest-plugin-hyperf/.github/workflows/release.yaml delete mode 100644 src/pest-plugin-hyperf/LICENSE delete mode 100644 src/pest-plugin-hyperf/README.md delete mode 100644 src/pest-plugin-hyperf/composer.json delete mode 100644 src/pest-plugin-hyperf/src/Plugin.php diff --git a/composer.json b/composer.json index d4526e3ae..3a11f7e5e 100644 --- a/composer.json +++ b/composer.json @@ -154,7 +154,6 @@ "friendsofhyperf/notification-mail": "*", "friendsofhyperf/oauth2-server": "*", "friendsofhyperf/openai-client": "*", - "friendsofhyperf/pest-plugin-hyperf": "*", "friendsofhyperf/pretty-console": "*", "friendsofhyperf/purifier": "*", "friendsofhyperf/recaptcha": "*", @@ -223,8 +222,7 @@ "FriendsOfHyperf\\Tinker\\": "src/tinker/src/", "FriendsOfHyperf\\Trigger\\": "src/trigger/src/", "FriendsOfHyperf\\ValidatedDTO\\": "src/validated-dto/src/", - "FriendsOfHyperf\\WebTinker\\": "src/web-tinker/src/", - "Pest\\Hyperf\\": "src/pest-plugin-hyperf/src/" + "FriendsOfHyperf\\WebTinker\\": "src/web-tinker/src/" }, "files": [ "src/amqp-job/src/Functions.php", diff --git a/docs/.vitepress/src/en/sidebars.ts b/docs/.vitepress/src/en/sidebars.ts index dc8c0736c..7248b8d2d 100644 --- a/docs/.vitepress/src/en/sidebars.ts +++ b/docs/.vitepress/src/en/sidebars.ts @@ -157,10 +157,6 @@ const sidebar:DefaultTheme.Sidebar = { text: 'OpenAI Client', link: '/en/components/openai-client.md' }, - { - text: 'Pest Plugin Hyperf', - link: '/en/components/pest-plugin-hyperf.md' - }, { text: 'Pretty Console', link: '/en/components/pretty-console.md' diff --git a/docs/.vitepress/src/zh-cn/sidebars.ts b/docs/.vitepress/src/zh-cn/sidebars.ts index 0e6b43516..6197a461c 100644 --- a/docs/.vitepress/src/zh-cn/sidebars.ts +++ b/docs/.vitepress/src/zh-cn/sidebars.ts @@ -170,10 +170,6 @@ const sidebar:DefaultTheme.Sidebar = { text: 'OpenAI Client', link: '/zh-cn/components/openai-client.md' }, - { - text: 'Pest Plugin Hyperf', - link: '/zh-cn/components/pest-plugin-hyperf.md' - }, { text: 'Pretty Console', link: '/zh-cn/components/pretty-console.md' diff --git a/docs/.vitepress/src/zh-hk/sidebars.ts b/docs/.vitepress/src/zh-hk/sidebars.ts index 24eccefb2..77623d948 100644 --- a/docs/.vitepress/src/zh-hk/sidebars.ts +++ b/docs/.vitepress/src/zh-hk/sidebars.ts @@ -170,10 +170,6 @@ const sidebar:DefaultTheme.Sidebar = { text: 'OpenAI Client', link: '/zh-hk/components/openai-client.md' }, - { - text: 'Pest Plugin Hyperf', - link: '/zh-hk/components/pest-plugin-hyperf.md' - }, { text: 'Pretty Console', link: '/zh-hk/components/pretty-console.md' diff --git a/docs/.vitepress/src/zh-tw/sidebars.ts b/docs/.vitepress/src/zh-tw/sidebars.ts index 41b299d86..b4c36be4b 100644 --- a/docs/.vitepress/src/zh-tw/sidebars.ts +++ b/docs/.vitepress/src/zh-tw/sidebars.ts @@ -170,10 +170,6 @@ const sidebar:DefaultTheme.Sidebar = { text: 'OpenAI Client', link: '/zh-tw/components/openai-client.md' }, - { - text: 'Pest Plugin Hyperf', - link: '/zh-tw/components/pest-plugin-hyperf.md' - }, { text: 'Pretty Console', link: '/zh-tw/components/pretty-console.md' diff --git a/docs/en/components/pest-plugin-hyperf.md b/docs/en/components/pest-plugin-hyperf.md deleted file mode 100644 index 42bc805e5..000000000 --- a/docs/en/components/pest-plugin-hyperf.md +++ /dev/null @@ -1,37 +0,0 @@ -# Pest Plugin Hyperf - -> This is a [Pest](https://pestphp.com) plugin that enables your Hyperf project's Pest to run in a Swoole-based coroutine environment. - -## Installation - -```shell -composer require friendsofhyperf/pest-plugin-hyperf --dev -``` - -## Usage - -```shell -php vendor/bin/pest --coroutine -# or -php vendor/bin/pest --prepend test/prepend.php --coroutine -``` - -- Configure test/prepend.php - -```php -get(Hyperf\Contract\ApplicationInterface::class); -})(); - -``` \ No newline at end of file diff --git a/docs/zh-cn/components/pest-plugin-hyperf.md b/docs/zh-cn/components/pest-plugin-hyperf.md deleted file mode 100644 index ad7d26d9b..000000000 --- a/docs/zh-cn/components/pest-plugin-hyperf.md +++ /dev/null @@ -1,37 +0,0 @@ -# Pest Plugin Hyperf - -> 这是一个 [Pest](https://pestphp.com) 插件,使您的 Hyperf 项目的 Pest 能够在基于 Swoole 的协程环境中运行。 - -## 安装 - -```shell -composer require friendsofhyperf/pest-plugin-hyperf --dev -``` - -## 使用 - -```shell -php vendor/bin/pest --coroutine -# or -php vendor/bin/pest --prepend test/prepend.php --coroutine -``` - -- 配置 test/prepend.php - -```php -get(Hyperf\Contract\ApplicationInterface::class); -})(); - -``` diff --git a/docs/zh-cn/guide/start/components.md b/docs/zh-cn/guide/start/components.md index 0ad7fd140..2d977c904 100644 --- a/docs/zh-cn/guide/start/components.md +++ b/docs/zh-cn/guide/start/components.md @@ -42,7 +42,6 @@ |[notification-mail](https://github.com/friendsofhyperf/notification-mail)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/notification-mail/v)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/downloads)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/d/monthly)](https://packagist.org/packages/friendsofhyperf/notification-mail)| |[oauth2-server](https://github.com/friendsofhyperf/oauth2-server)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/oauth2-server/v)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/downloads)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/d/monthly)](https://packagist.org/packages/friendsofhyperf/oauth2-server)| |[openai-client](https://github.com/friendsofhyperf/openai-client)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/openai-client/v)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/downloads)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/d/monthly)](https://packagist.org/packages/friendsofhyperf/openai-client)| -|[pest-plugin-hyperf](https://github.com/friendsofhyperf/pest-plugin-hyperf)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/v)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/downloads)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/d/monthly)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)| |[pretty-console](https://github.com/friendsofhyperf/pretty-console)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pretty-console/v)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/downloads)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/d/monthly)](https://packagist.org/packages/friendsofhyperf/pretty-console)| |[purifier](https://github.com/friendsofhyperf/purifier)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/purifier/v)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/purifier/downloads)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/purifier/d/monthly)](https://packagist.org/packages/friendsofhyperf/purifier)| |[recaptcha](https://github.com/friendsofhyperf/recaptcha)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/recaptcha/v)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/downloads)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/d/monthly)](https://packagist.org/packages/friendsofhyperf/recaptcha)| diff --git a/docs/zh-hk/components/pest-plugin-hyperf.md b/docs/zh-hk/components/pest-plugin-hyperf.md deleted file mode 100644 index 98514a11f..000000000 --- a/docs/zh-hk/components/pest-plugin-hyperf.md +++ /dev/null @@ -1,37 +0,0 @@ -# Pest Plugin Hyperf - -> 這是一個 [Pest](https://pestphp.com) 插件,使您的 Hyperf 項目的 Pest 能夠在基於 Swoole 的協程環境中運行。 - -## 安裝 - -```shell -composer require friendsofhyperf/pest-plugin-hyperf --dev -``` - -## 使用 - -```shell -php vendor/bin/pest --coroutine -# or -php vendor/bin/pest --prepend test/prepend.php --coroutine -``` - -- 配置 test/prepend.php - -```php -get(Hyperf\Contract\ApplicationInterface::class); -})(); - -``` diff --git a/docs/zh-hk/guide/start/components.md b/docs/zh-hk/guide/start/components.md index 5c1191615..0f3bbd9c9 100644 --- a/docs/zh-hk/guide/start/components.md +++ b/docs/zh-hk/guide/start/components.md @@ -43,7 +43,6 @@ |[notification-mail](https://github.com/friendsofhyperf/notification-mail)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/notification-mail/v)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/downloads)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/d/monthly)](https://packagist.org/packages/friendsofhyperf/notification-mail)| |[oauth2-server](https://github.com/friendsofhyperf/oauth2-server)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/oauth2-server/v)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/downloads)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/d/monthly)](https://packagist.org/packages/friendsofhyperf/oauth2-server)| |[openai-client](https://github.com/friendsofhyperf/openai-client)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/openai-client/v)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/downloads)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/d/monthly)](https://packagist.org/packages/friendsofhyperf/openai-client)| -|[pest-plugin-hyperf](https://github.com/friendsofhyperf/pest-plugin-hyperf)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/v)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/downloads)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/d/monthly)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)| |[pretty-console](https://github.com/friendsofhyperf/pretty-console)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pretty-console/v)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/downloads)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/d/monthly)](https://packagist.org/packages/friendsofhyperf/pretty-console)| |[purifier](https://github.com/friendsofhyperf/purifier)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/purifier/v)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/purifier/downloads)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/purifier/d/monthly)](https://packagist.org/packages/friendsofhyperf/purifier)| |[recaptcha](https://github.com/friendsofhyperf/recaptcha)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/recaptcha/v)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/downloads)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/d/monthly)](https://packagist.org/packages/friendsofhyperf/recaptcha)| diff --git a/docs/zh-tw/components/pest-plugin-hyperf.md b/docs/zh-tw/components/pest-plugin-hyperf.md deleted file mode 100644 index 1d75aeab3..000000000 --- a/docs/zh-tw/components/pest-plugin-hyperf.md +++ /dev/null @@ -1,37 +0,0 @@ -# Pest Plugin Hyperf - -> 這是一個 [Pest](https://pestphp.com) 外掛,使您的 Hyperf 專案的 Pest 能夠在基於 Swoole 的協程環境中執行。 - -## 安裝 - -```shell -composer require friendsofhyperf/pest-plugin-hyperf --dev -``` - -## 使用 - -```shell -php vendor/bin/pest --coroutine -# or -php vendor/bin/pest --prepend test/prepend.php --coroutine -``` - -- 配置 test/prepend.php - -```php -get(Hyperf\Contract\ApplicationInterface::class); -})(); - -``` diff --git a/docs/zh-tw/guide/start/components.md b/docs/zh-tw/guide/start/components.md index 51cf60210..63955aa72 100644 --- a/docs/zh-tw/guide/start/components.md +++ b/docs/zh-tw/guide/start/components.md @@ -43,7 +43,6 @@ |[notification-mail](https://github.com/friendsofhyperf/notification-mail)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/notification-mail/v)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/downloads)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/d/monthly)](https://packagist.org/packages/friendsofhyperf/notification-mail)| |[oauth2-server](https://github.com/friendsofhyperf/oauth2-server)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/oauth2-server/v)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/downloads)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/d/monthly)](https://packagist.org/packages/friendsofhyperf/oauth2-server)| |[openai-client](https://github.com/friendsofhyperf/openai-client)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/openai-client/v)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/downloads)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/d/monthly)](https://packagist.org/packages/friendsofhyperf/openai-client)| -|[pest-plugin-hyperf](https://github.com/friendsofhyperf/pest-plugin-hyperf)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/v)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/downloads)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/d/monthly)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)| |[pretty-console](https://github.com/friendsofhyperf/pretty-console)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pretty-console/v)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/downloads)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/d/monthly)](https://packagist.org/packages/friendsofhyperf/pretty-console)| |[purifier](https://github.com/friendsofhyperf/purifier)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/purifier/v)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/purifier/downloads)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/purifier/d/monthly)](https://packagist.org/packages/friendsofhyperf/purifier)| |[recaptcha](https://github.com/friendsofhyperf/recaptcha)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/recaptcha/v)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/downloads)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/d/monthly)](https://packagist.org/packages/friendsofhyperf/recaptcha)| diff --git a/src/.github/profile/README.md b/src/.github/profile/README.md index 0ad7fd140..2d977c904 100644 --- a/src/.github/profile/README.md +++ b/src/.github/profile/README.md @@ -42,7 +42,6 @@ |[notification-mail](https://github.com/friendsofhyperf/notification-mail)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/notification-mail/v)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/downloads)](https://packagist.org/packages/friendsofhyperf/notification-mail)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/notification-mail/d/monthly)](https://packagist.org/packages/friendsofhyperf/notification-mail)| |[oauth2-server](https://github.com/friendsofhyperf/oauth2-server)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/oauth2-server/v)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/downloads)](https://packagist.org/packages/friendsofhyperf/oauth2-server)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/oauth2-server/d/monthly)](https://packagist.org/packages/friendsofhyperf/oauth2-server)| |[openai-client](https://github.com/friendsofhyperf/openai-client)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/openai-client/v)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/downloads)](https://packagist.org/packages/friendsofhyperf/openai-client)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/openai-client/d/monthly)](https://packagist.org/packages/friendsofhyperf/openai-client)| -|[pest-plugin-hyperf](https://github.com/friendsofhyperf/pest-plugin-hyperf)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/v)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/downloads)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pest-plugin-hyperf/d/monthly)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf)| |[pretty-console](https://github.com/friendsofhyperf/pretty-console)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/pretty-console/v)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/downloads)](https://packagist.org/packages/friendsofhyperf/pretty-console)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/pretty-console/d/monthly)](https://packagist.org/packages/friendsofhyperf/pretty-console)| |[purifier](https://github.com/friendsofhyperf/purifier)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/purifier/v)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/purifier/downloads)](https://packagist.org/packages/friendsofhyperf/purifier)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/purifier/d/monthly)](https://packagist.org/packages/friendsofhyperf/purifier)| |[recaptcha](https://github.com/friendsofhyperf/recaptcha)|[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/recaptcha/v)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Total Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/downloads)](https://packagist.org/packages/friendsofhyperf/recaptcha)|[![Monthly Downloads](https://poser.pugx.org/friendsofhyperf/recaptcha/d/monthly)](https://packagist.org/packages/friendsofhyperf/recaptcha)| diff --git a/src/pest-plugin-hyperf/.gitattributes b/src/pest-plugin-hyperf/.gitattributes deleted file mode 100644 index c90148b0e..000000000 --- a/src/pest-plugin-hyperf/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -/.github export-ignore -/.vscode export-ignore -/tests export-ignore -.gitattributes export-ignore \ No newline at end of file diff --git a/src/pest-plugin-hyperf/.github/FUNDING.yml b/src/pest-plugin-hyperf/.github/FUNDING.yml deleted file mode 100644 index e52b3cbcd..000000000 --- a/src/pest-plugin-hyperf/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -github: huangdijia -custom: https://hdj.me/sponsors/ \ No newline at end of file diff --git a/src/pest-plugin-hyperf/.github/workflows/close-pull-request.yml b/src/pest-plugin-hyperf/.github/workflows/close-pull-request.yml deleted file mode 100644 index 8605acc19..000000000 --- a/src/pest-plugin-hyperf/.github/workflows/close-pull-request.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: Close Pull Request - -on: - pull_request_target: - types: [opened] - -jobs: - run: - uses: friendsofhyperf/.github/.github/workflows/close-pull-request.yml@main diff --git a/src/pest-plugin-hyperf/.github/workflows/release.yaml b/src/pest-plugin-hyperf/.github/workflows/release.yaml deleted file mode 100644 index f924464bf..000000000 --- a/src/pest-plugin-hyperf/.github/workflows/release.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Release - -on: - push: - tags: - - "v*.*.*" - -jobs: - build: - uses: friendsofhyperf/.github/.github/workflows/release.yaml@main \ No newline at end of file diff --git a/src/pest-plugin-hyperf/LICENSE b/src/pest-plugin-hyperf/LICENSE deleted file mode 100644 index 439eee00d..000000000 --- a/src/pest-plugin-hyperf/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) D.J.Hwang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/pest-plugin-hyperf/README.md b/src/pest-plugin-hyperf/README.md deleted file mode 100644 index 560890484..000000000 --- a/src/pest-plugin-hyperf/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# pest-plugin-hyperf - -[![Latest Stable Version](https://img.shields.io/packagist/v/friendsofhyperf/pest-plugin-hyperf)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf) -[![Total Downloads](https://img.shields.io/packagist/dt/friendsofhyperf/pest-plugin-hyperf)](https://packagist.org/packages/friendsofhyperf/pest-plugin-hyperf) -[![License](https://img.shields.io/packagist/l/friendsofhyperf/pest-plugin-hyperf)](https://github.com/friendsofhyperf/pest-plugin-hyperf) - -> This is a [Pest](https://pestphp.com) plugin that enables your Hyperf project's Pest to run within a Swoole-based coroutine environment. - -## Installation - -```shell -composer require friendsofhyperf/pest-plugin-hyperf --dev -``` - -## Usage - -```shell -php vendor/bin/pest --coroutine -# or -php vendor/bin/pest --prepend test/prepend.php --coroutine -``` - -- test/prepend.php - -```php -get(Hyperf\Contract\ApplicationInterface::class); -})(); - -``` - -## Contact - -- [Twitter](https://twitter.com/huangdijia) -- [Gmail](mailto:huangdijia@gmail.com) - -## License - -[MIT](LICENSE) diff --git a/src/pest-plugin-hyperf/composer.json b/src/pest-plugin-hyperf/composer.json deleted file mode 100644 index 98c55703f..000000000 --- a/src/pest-plugin-hyperf/composer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "friendsofhyperf/pest-plugin-hyperf", - "description": "The Pest Hyperf Plugin.", - "license": "MIT", - "keywords": [ - "dev", - "php", - "framework", - "pest", - "unit", - "test", - "testing", - "plugin", - "hyperf", - "v3.1" - ], - "authors": [ - { - "name": "huangdijia", - "email": "huangdijia@gmail.com" - } - ], - "support": { - "issues": "https://github.com/friendsofhyperf/components/issues", - "source": "https://github.com/friendsofhyperf/components", - "docs": "https://hyperf.fans", - "pull-request": "https://github.com/friendsofhyperf/components/pulls" - }, - "require": { - "php": "^8.1", - "ext-swoole": "*", - "hyperf/coordinator": "~3.1.0", - "hyperf/di": "~3.1.0", - "hyperf/support": "~3.1.0", - "pestphp/pest": "^2.8.0", - "pestphp/pest-plugin": "^2.0.1" - }, - "autoload": { - "psr-4": { - "Pest\\Hyperf\\": "src/" - } - }, - "config": { - "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-main": "3.1-dev" - }, - "pest": { - "plugins": [ - "Pest\\Hyperf\\Plugin" - ] - } - } -} diff --git a/src/pest-plugin-hyperf/src/Plugin.php b/src/pest-plugin-hyperf/src/Plugin.php deleted file mode 100644 index 3c8c0a99a..000000000 --- a/src/pest-plugin-hyperf/src/Plugin.php +++ /dev/null @@ -1,100 +0,0 @@ -prepend($arguments); - - if (! $this->hasArgument('--coroutine', $arguments)) { - return $arguments; - } - - $arguments = $this->popArgument('--coroutine', $arguments); - - if (Coroutine::getCid() > 0) { - return $arguments; - } - - if ($this->hasArgument('--parallel', $arguments) || $this->hasArgument('-p', $arguments)) { - throw new InvalidOption('The [--coroutine] option is not supported when running in parallel.'); - } - - exit($this->runTestsInCoroutine($arguments)); - } - - private function runTestsInCoroutine(array $arguments): int - { - $code = 0; - /** @var Kernel $kernel */ - $kernel = Container::getInstance()->get(Kernel::class); - - Coroutine::set([ - 'hook_flags' => SWOOLE_HOOK_ALL, - 'exit_condition' => fn () => Coroutine::stats()['coroutine_num'] === 0, - ]); - - /* @phpstan-ignore-next-line */ - \Swoole\Coroutine\run(static function () use (&$code, $kernel, $arguments) { - $code = $kernel->handle($arguments, []); - Timer::clearAll(); - CoordinatorManager::until(Constants::WORKER_EXIT)->resume(); - }); - - $kernel->shutdown(); - - return $code; - } - - private function prepend(array $arguments): array - { - $prepend = null; - - foreach ($arguments as $key => $argument) { - if (str_starts_with($argument, '--prepend=')) { - $prepend = explode('=', $argument, 2)[1]; - unset($arguments[$key]); - break; - } - - if (str_starts_with($argument, '--prepend')) { - if (isset($arguments[$key + 1])) { - $prepend = $arguments[$key + 1]; - unset($arguments[$key + 1]); - } - unset($arguments[$key]); - } - } - - if ($prepend && file_exists($prepend)) { - require_once $prepend; - } - - return $arguments; - } -}