Skip to content

Commit f8860d5

Browse files
committed
PHP 版本限制不小于 7.3
1 parent c5c9564 commit f8860d5

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h1>Freenom:freenom域名自动续期</h1>
33

44
[![Build Status](https://img.shields.io/badge/build-passed-brightgreen?style=for-the-badge)](https://scrutinizer-ci.com/g/luolongfei/freenom/build-status/master)
5-
[![Php Version](https://img.shields.io/badge/php-%3E=7.2-brightgreen.svg?style=for-the-badge)](https://secure.php.net/)
5+
[![Php Version](https://img.shields.io/badge/php-%3E=7.3-brightgreen.svg?style=for-the-badge)](https://secure.php.net/)
66
[![Scrutinizer Code Quality](https://img.shields.io/badge/scrutinizer-9.31-brightgreen?style=for-the-badge)](https://scrutinizer-ci.com/g/luolongfei/freenom/?branch=master)
77
[![MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge)](https://github.com/luolongfei/freenom/blob/main/LICENSE)
88

@@ -64,7 +64,7 @@ Documentation: [English version](https://github.com/luolongfei/freenom/blob/main
6464

6565
### 🎁 事前准备
6666

67-
- VPS:随便一台服务器都行,系统推荐`Centos7`或者`Debian`,另外 PHP 版本需在`php7.2`及以上。如果你没有服务器,推荐参考下方文档
67+
- VPS:随便一台服务器都行,系统推荐`Debian`或者`Centos7`,另外 PHP 版本需在`php7.3`及以上。如果你没有服务器,推荐参考下方文档
6868
[🕹 通过腾讯云函数部署](#-方式二通过腾讯云函数部署) 或者 [🧊 通过阿里云函数部署](#-方式三通过阿里云函数部署)
6969
- 送信邮箱(可选):为了方便理解又称机器人邮箱,用于发送通知邮件。目前针对`Gmail``QQ邮箱``163邮箱`以及`Outlook邮箱`,程序会自动判断送信邮箱类型并使用合适的配置。
7070
如果你使用的是其它第三方邮箱或者自建邮件服务,那么请参考 [.env.example](https://github.com/luolongfei/freenom/blob/main/.env.example)
@@ -78,7 +78,7 @@ Documentation: [English version](https://github.com/luolongfei/freenom/blob/main
7878

7979
此处会分别介绍`邮件送信` / `Telegram Bot` / `企业微信` / `Server 酱` / `Bark`送信方式的配置方法,以及其所需的资料,你可以任选一种送信方式进行配置,直接跳到对应的文档查看即可。 如果你是 IOS
8080
用户,推荐使用 `Bark`
81-
送信方式,一切尽在掌握的感觉很好。其它平台的用户根据自己喜好选择可接受的送信方式即可。这里非常不推荐使用`Server 酱`送信,`Server 酱`每日送信条数的限制,以及需要开会员才能直接看到送信内容,否则需要跳到 `Server 酱`
81+
送信方式,其它平台的用户根据自己喜好选择可接受的送信方式即可。不太推荐使用`Server 酱`送信,`Server 酱`每日送信条数的限制,以及需要开会员才能直接看到送信内容,否则需要跳到 `Server 酱`
8282
网站才能查看内容,都是不推荐的原因。同样的配置完全可以直接使用`企业微信`送信方式,`企业微信`送信直接在普通微信客户端就能看到信件内容。
8383

8484
*快速到文档指定位置:*
@@ -89,7 +89,7 @@ Documentation: [English version](https://github.com/luolongfei/freenom/blob/main
8989

9090
[企业微信](#企业微信)
9191

92-
[Server 酱](#Server-酱)(不推荐)
92+
[Server 酱](#Server-酱)
9393

9494
[Bark 送信](#Bark-送信)
9595

@@ -574,13 +574,13 @@ systemctl restart docker
574574
[![aliyun13.png](https://s4.ax1x.com/2021/12/14/ovumgs.png)](https://s4.ax1x.com/2021/12/14/ovumgs.png)
575575

576576
> 在阿里云函数如何修改或者新增环境变量呢?
577-
>
577+
>
578578
请参考下图操作。
579579

580580
[![aliyun14.png](https://s4.ax1x.com/2021/12/14/ovRKQe.png)](https://s4.ax1x.com/2021/12/14/ovRKQe.png)
581581

582582
> 在阿里云函数如何更新代码或者升级代码到最新版本呢?
583-
>
583+
>
584584
参考下图,上传新的代码包后,阿里云函数编辑器可能会提示你同步代码,点击【是】即可。然后记得点击【部署】并测试。
585585

586586
[![aliyun15.png](https://s4.ax1x.com/2021/12/14/ovW6HA.png)](https://s4.ax1x.com/2021/12/14/ovW6HA.png)
@@ -768,6 +768,8 @@ cd /data/wwwroot/freenom/ && php run
768768
##### Changed
769769

770770
- 解决 企业微信 因送信内容过长被截断问题
771+
- PHP 版本最低要求不低于 7.3
772+
- 增加英文相关文言,支持中英文切换
771773

772774
#### [v0.4.4](https://github.com/luolongfei/freenom/releases/tag/v0.4.4) - 2021-12-14
773775

README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h1>Freenom: freenom domain name renews automatically</h1>
33

44
[![Build Status](https://img.shields.io/badge/build-passed-brightgreen?style=for-the-badge)](https://scrutinizer-ci.com/g/luolongfei/freenom/build-status/master)
5-
[![Php Version](https://img.shields.io/badge/php-%3E=7.2-brightgreen.svg?style=for-the-badge)](https://secure.php.net/)
5+
[![Php Version](https://img.shields.io/badge/php-%3E=7.3-brightgreen.svg?style=for-the-badge)](https://secure.php.net/)
66
[![Scrutinizer Code Quality](https://img.shields.io/badge/scrutinizer-9.31-brightgreen?style=for-the-badge)](https://scrutinizer-ci.com/g/luolongfei/freenom/?branch=master)
77
[![MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge)](https://github.com/luolongfei/freenom/blob/main/LICENSE)
88

app/helpers.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ function get_argv(string $name, string $default = '')
232232
*/
233233
function system_check()
234234
{
235-
if (version_compare(PHP_VERSION, '7.0.0') < 0) {
236-
throw new LlfException(34520006);
235+
if (version_compare(PHP_VERSION, '7.3.0') < 0) {
236+
throw new LlfException(34520006, ['7.3', PHP_VERSION]);
237237
}
238238

239239
// 如果是在云函数部署,则不需要检查这几项

index.php

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
function customize_error_handler()
5050
{
5151
if (!is_null($error = error_get_last())) {
52+
system_log(json_encode($error, JSON_UNESCAPED_UNICODE));
5253
Log::error(lang('100057'), $error);
5354
Message::send(lang('100058') . json_encode($error, JSON_UNESCAPED_UNICODE), lang('100059'));
5455
}

resources/lang/en.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'34520003' => 'Domain data match failed, maybe you don\'t have a domain name or the page of freenom has changed causing the regular expression to fail, please contact the author promptly: https://github.com/luolongfei/freenom/issues',
1515
'34520004' => 'token match failed, may be the regular expression failed due to the page revision, please contact the author promptly: https://github.com/luolongfei/freenom/issues',
1616
'34520005' => 'The putenv() function is disabled and cannot write to environment variables, so the program does not work properly, please enable the putenv() function',
17-
'34520006' => sprintf('Versions below php7 are not supported, the current version is %s, please upgrade to php7 or above', PHP_VERSION),
17+
'34520006' => 'The version of PHP is not allowed to be less than %s, the current version of PHP is %s, please upgrade your version of PHP, otherwise it will not work properly. If it is not convenient to upgrade PHP, we recommend using the Docker version of this project: https://hub.docker.com/r/luolongfei/freenom',
1818
'34520007' => sprintf('The .env configuration file is automatically generated in the %s directory, please change the contents of the configuration file to your own', ROOT_PATH),
1919
'34520008' => sprintf('Please copy the .env.example file in the %s directory to an .env file and change the contents of the .env file to your own', ROOT_PATH),
2020
'34520009' => 'Error getting domain status, probably not logged in or login is invalid, please try again',

resources/lang/zh.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'34520003' => '域名数据匹配失败,可能是你暂时没有域名或者页面改版导致正则失效,请及时联系作者:https://github.com/luolongfei/freenom/issues',
1515
'34520004' => 'token 匹配失败,可能是页面改版导致正则失效,请及时联系作者:https://github.com/luolongfei/freenom/issues',
1616
'34520005' => 'putenv() 函数被禁用,无法写入环境变量导致程序无法正常运作,请启用 putenv() 函数',
17-
'34520006' => sprintf('不支持 php7 以下的版本,当前版本为%s,请升级到 php7 以上', PHP_VERSION),
17+
'34520006' => 'PHP 的版本不允许小于 %s,当前 PHP 版本为 %s,请升级你的 PHP 版本,否则无法正常运行。如果不方便升级 PHP,推荐使用本项目的 Docker 版:https://hub.docker.com/r/luolongfei/freenom',
1818
'34520007' => sprintf('已自动在%s目录下生成 .env 配置文件,请将配置文件中的各项内容修改为你自己的', ROOT_PATH),
1919
'34520008' => sprintf('请将%s目录下的 .env.example 文件复制为 .env 文件,并将 .env 文件中的各项内容修改为你自己的', ROOT_PATH),
2020
'34520009' => '获取域名状态页面出错,可能是未登录或者登录失效,请重试。',

run

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ use Luolongfei\Libs\Message;
5050
function customize_error_handler()
5151
{
5252
if (!is_null($error = error_get_last())) {
53+
system_log(json_encode($error, JSON_UNESCAPED_UNICODE));
5354
Log::error(lang('100057'), $error);
5455
Message::send(lang('100058') . json_encode($error, JSON_UNESCAPED_UNICODE), lang('100059'));
5556
}

0 commit comments

Comments
 (0)