diff --git a/README-CN.md b/README-CN.md index 0045e1b..9d68c69 100644 --- a/README-CN.md +++ b/README-CN.md @@ -2,7 +2,7 @@ # box, by Hyperf -Box 致力于帮助提升 Hyperf 应用程序的编程体验,管理 PHP 环境和相关依赖,同时提供将 Hyperf 应用程序打包为二进制程序的能力,还提供反向代理服务来管理和部署 Hyperf 应用程序。 +Box 致力于帮助提升 PHP 应用程序的编程体验,尤其有助于 Hyperf 应用,管理 PHP 环境和相关依赖,同时提供将 PHP 应用程序打包为二进制程序的能力,还提供反向代理服务来管理和部署 Swoole/Swow 服务。 ## 目前还是早期实验版本,欢迎试玩 ~ @@ -13,7 +13,7 @@ Box 致力于帮助提升 Hyperf 应用程序的编程体验,管理 PHP 环境 ##### Mac ```bash -wget https://github.com/hyperf/box/releases/download/v0.4.0/box_x86_64_macos -O box +wget https://github.com/hyperf/box/releases/download/v0.5.0/box_x86_64_macos -O box sudo mv ./box /usr/local/bin/box sudo chmod 755 /usr/local/bin/box // 确保 /usr/local/bin/box 在你的 $PATH 环境中,或者将 `box` 放到你想要的任意 $PATH 路径中 @@ -22,7 +22,7 @@ sudo chmod 755 /usr/local/bin/box ##### Linux x86_64 ```bash -wget https://github.com/hyperf/box/releases/download/v0.4.0/box_x86_64_linux -O box +wget https://github.com/hyperf/box/releases/download/v0.5.0/box_x86_64_linux -O box sudo mv ./box /usr/local/bin/box sudo chmod 755 /usr/local/bin/box // 确保 /usr/local/bin/box 在你的 $PATH 环境中,或者将 `box` 放到你想要的任意 $PATH 路径中 @@ -38,6 +38,13 @@ sudo chmod 755 /usr/local/bin/box // 确保 /usr/local/bin/box 在你的 $PATH 环境中,或者将 `box` 放到你想要的任意 $PATH 路径中 ``` +##### Windows + +```powershell +curl -o box.exe https://github.com/hyperf/box/releases/download/v0.5.0/box_x64_windows.exe +// 将 `box.exe` 放到你想要的任意 Path 环境变量路径中,同时 Windows 版本在执行时需要在命令行中使用 `box.exe` 而不是 `box` +``` + #### 初始化 Github Access Token Box 需要一个 Github 访问令牌来请求 Github API,以检索包的版本。 @@ -48,13 +55,13 @@ Box 需要一个 Github 访问令牌来请求 Github API,以检索包的版本 #### 设置 Box Kernel -默认情况下,Box 由 Swow Kernel 提供支持,但是我们也提供了 Swoole Kernel,您可以通过 `box config set kernel swoole` 来切换为 Swoole Kernel,但是需要注意的是,Swoole Kernel 仅支持 PHP 8.1 版本,且不支持构建二进制程序功能。 +默认情况下,Box 由 Swow Kernel 提供支持,但是我们也提供了 Swoole Kernel,您可以通过 `box config set kernel swoole` 来切换为 Swoole Kernel,但是需要注意的是,Swoole Kernel 仅支持 PHP 8.1 版本,且不支持构建二进制程序功能和 Windows 系统环境。 ```bash // 设置为 Swow Kernel [默认] box config set kernel swow -// 设置为 Swoole Kernel +// 设置为 Swoole Kernel (不支持 Windows) box config set kernel swoole ``` @@ -73,7 +80,6 @@ box config set kernel swoole - `box config get-php-version `获取 box 的当前设置的 PHP 版本 - `box reverse-proxy -u ` 启动一个反向代理 HTTP 服务器,用于将 HTTP 请求转发到指定的多个上游服务器 - `box php ` 通过当前 box 的 PHP 版本运行任何 PHP 命令 -- `box swoole-cli ` 通过 swoole-cli 运行任何命令,此命令仅在 box v0.2.0 及以上的版本中可用 - `box composer `通过当前 box 的 PHP 版本运行任何 Composer 命令,composer bin 的版本取决于最后执行的`get composer`命令 - `box php-cs-fixer ` 通过当前 box 的 PHP 版本运行任何 `php-cs-fixer` 命令,composer bin 的版本取决于最后执行的 `get php-cs-fixer` 命令 - `box cs-fix ` 通过当前 box 的 PHP 版本运行 `php-cs-fixer fix` 命令,composer bin 的版本取决于最后执行的 `get php-cs-fixer` 命令 diff --git a/README.md b/README.md index 443b5fd..7fe5c1c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ English | [中文](./README-CN.md) # box, by Hyperf -Box is committed to helping improve the programming experience of Hyperf applications, managing the PHP environment and related dependencies, providing the ability to package Hyperf applications as binary programs, and also providing reverse proxy services for managing and deploying Hyperf applications. +Box is committed to helping improve the programming experience of PHP applications, expecially for Hyperf, managing the PHP environment and related dependencies, providing the ability to package PHP applications as binary programs, and also providing reverse proxy services for managing and deploying Swoole/Swow applications. ## This is still an early experimental version, have fun ~ @@ -13,7 +13,7 @@ Box is committed to helping improve the programming experience of Hyperf applica ##### Mac ```bash -wget https://github.com/hyperf/box/releases/download/v0.4.0/box_x86_64_macos -O box +wget https://github.com/hyperf/box/releases/download/v0.5.0/box_x86_64_macos -O box sudo mv ./box /usr/local/bin/box sudo chmod 755 /usr/local/bin/box // Make sure /usr/local/bin/box in your $PATH env, or put `box` into any path in $PATH env that you want @@ -22,7 +22,7 @@ sudo chmod 755 /usr/local/bin/box ##### Linux x86_64 ```bash -wget https://github.com/hyperf/box/releases/download/v0.4.0/box_x86_64_linux -O box +wget https://github.com/hyperf/box/releases/download/v0.5.0/box_x86_64_linux -O box sudo mv ./box /usr/local/bin/box sudo chmod 755 /usr/local/bin/box // Make sure /usr/local/bin/box in your $PATH env, or put `box` into any path in $PATH env that you want @@ -38,6 +38,13 @@ sudo chmod 755 /usr/local/bin/box // Make sure /usr/local/bin/box in your $PATH env, or put `box` into any path in $PATH env that you want ``` +##### Windows + +```powershell +curl -o box.exe https://github.com/hyperf/box/releases/download/v0.5.0/box_x64_windows.exe +// Put `box.exe` into any path in $PATH env that you want, and use `box.exe` instead of `box` when executing on Windows +``` + #### Init Github Access Token Box needs a Github Access Token to request github api, to retrieve the versions of the package. @@ -48,13 +55,13 @@ Box needs a Github Access Token to request github api, to retrieve the versions #### Setting the Box Kernel -By default, Box is supported by Swow Kernel, but we also provide Swoole Kernel, you can switch to Swoole Kernel by `box config set kernel swoole`, but it should be noted that Swoole Kernel only supports PHP 8.1 version, and The Build Binaries feature is not supported. +By default, Box is supported by Swow Kernel, but we also provide Swoole Kernel, you can switch to Swoole Kernel by `box config set kernel swoole`, but it should be noted that Swoole Kernel only supports PHP 8.1 version, and The Build Binaries feature and Windows Systems are not supported. ```bash // set to Swow Kernel [default] box config set kernel swow -// set to Swoole Kernel +// set to Swoole Kernel (NOT supported on Windows) box config set kernel swoole ```` @@ -73,7 +80,6 @@ box config set kernel swoole - `box config get-php-version ` to get the current PHP version of box - `box reverse-proxy -u ` to start a reverse proxy HTTP server for the upstream servers - `box php ` to run any PHP command via current PHP version of box -- `box swoole-cli ` to run any command via swoole-cli, since box v0.2.0 - `box composer ` to run any Composer command via box, the version of the composer bin depends on the last executed `get composer` command - `box php-cs-fixer ` to run any `php-cs-fixer` command via box, the version of the composer bin depends on the last executed `get php-cs-fixer` command - `box cs-fix ` to run `php-cs-fix fix` command via box, the version of the composer bin depends on the last executed `get php-cs-fixer` command diff --git a/src/app/Box.php b/src/app/Box.php index f4099b3..e819448 100644 --- a/src/app/Box.php +++ b/src/app/Box.php @@ -14,5 +14,5 @@ class Box { - public const VERSION = '0.4.0'; + public const VERSION = '0.5.0'; }