diff --git a/CHANGELOG.md b/CHANGELOG.md index d5ac9d27..26b077a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +### [v1.2.5](https://gitee.com/koogua/course-tencent-cloud/releases/v1.2.5)(2021-01-20) + +### 新增 + +- 自动化安装脚本 +- 自动化更新脚本 +- 自动化备份脚本 + +### 更新 + +- 更新ip2region包 +- 更新php-cron-scheduler包 +- 替换aferrandini/phpqrcode为endroid/qr-code +- 替换joyqi/hyper-down为league/commonmark +- 移除lcobucci/jwt包 +- 相关连接指向官网 + ### [v1.2.4](https://gitee.com/koogua/course-tencent-cloud/releases/v1.2.4)(2021-01-10) #### 增加 diff --git a/README.md b/README.md index 29951f81..b8019549 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,11 @@ 酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展框架Phalcon开发,GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源在线教育系统。 -![](https://img.shields.io/static/v1?label=release&message=1.2.4&color=blue) -![](https://img.shields.io/static/v1?label=stars&message=170&color=blue) -![](https://img.shields.io/static/v1?label=forks&message=66&color=blue) -![](https://img.shields.io/static/v1?label=license&message=GPL-2.0&color=blue) +[![Gitee star](https://gitee.com/koogua/course-tencent-cloud/badge/star.svg?theme=gitee)](https://gitee.com/koogua/course-tencent-cloud) +[![Gitee fork](https://gitee.com/koogua/course-tencent-cloud/badge/fork.svg?theme=gitee)](https://gitee.com/koogua/course-tencent-cloud) +[![Github stars](https://img.shields.io/github/stars/mindskip/xzs-mysql?logo=github)](https://github.com/xiaochong0302/course-tencent-cloud) +[![Github forks](https://img.shields.io/github/forks/mindskip/xzs-mysql?logo=github)](https://github.com/xiaochong0302/course-tencent-cloud) +![GPL-2.0](https://img.shields.io/static/v1?label=license&message=GPL-2.0&color=blue) ### 系统功能 diff --git a/app/Console/Tasks/CourseIndexTask.php b/app/Console/Tasks/CourseIndexTask.php index 23a148cc..ec4fc523 100644 --- a/app/Console/Tasks/CourseIndexTask.php +++ b/app/Console/Tasks/CourseIndexTask.php @@ -60,11 +60,11 @@ class CourseIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start clean index' . PHP_EOL; + echo 'start clean course index' . PHP_EOL; $index->clean(); - echo 'end clean index' . PHP_EOL; + echo 'end clean course index' . PHP_EOL; } /** @@ -82,7 +82,7 @@ class CourseIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start rebuild index' . PHP_EOL; + echo 'start rebuild course index' . PHP_EOL; $index->beginRebuild(); @@ -93,7 +93,7 @@ class CourseIndexTask extends Task $index->endRebuild(); - echo 'end rebuild index' . PHP_EOL; + echo 'end rebuild course index' . PHP_EOL; } /** diff --git a/app/Console/Tasks/GroupIndexTask.php b/app/Console/Tasks/GroupIndexTask.php index 4e9c2918..2b3818c8 100644 --- a/app/Console/Tasks/GroupIndexTask.php +++ b/app/Console/Tasks/GroupIndexTask.php @@ -60,11 +60,11 @@ class GroupIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start clean index' . PHP_EOL; + echo 'start clean group index' . PHP_EOL; $index->clean(); - echo 'end clean index' . PHP_EOL; + echo 'end clean group index' . PHP_EOL; } /** @@ -82,7 +82,7 @@ class GroupIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start rebuild index' . PHP_EOL; + echo 'start rebuild group index' . PHP_EOL; $index->beginRebuild(); @@ -93,7 +93,7 @@ class GroupIndexTask extends Task $index->endRebuild(); - echo 'end rebuild index' . PHP_EOL; + echo 'end rebuild group index' . PHP_EOL; } /** diff --git a/app/Console/Tasks/UserIndexTask.php b/app/Console/Tasks/UserIndexTask.php index 6ce9c7d6..ccf999f4 100644 --- a/app/Console/Tasks/UserIndexTask.php +++ b/app/Console/Tasks/UserIndexTask.php @@ -60,11 +60,11 @@ class UserIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start clean index' . PHP_EOL; + echo 'start clean user index' . PHP_EOL; $index->clean(); - echo 'end clean index' . PHP_EOL; + echo 'end clean user index' . PHP_EOL; } /** @@ -82,7 +82,7 @@ class UserIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start rebuild index' . PHP_EOL; + echo 'start rebuild user index' . PHP_EOL; $index->beginRebuild(); @@ -93,7 +93,7 @@ class UserIndexTask extends Task $index->endRebuild(); - echo 'end rebuild index' . PHP_EOL; + echo 'end rebuild user index' . PHP_EOL; } /** diff --git a/app/Library/AppInfo.php b/app/Library/AppInfo.php index 945913fc..8283f49c 100644 --- a/app/Library/AppInfo.php +++ b/app/Library/AppInfo.php @@ -11,7 +11,7 @@ class AppInfo protected $link = 'https://koogua.com'; - protected $version = '1.2.4'; + protected $version = '1.2.5'; public function __get($name) { diff --git a/app/Library/Helper.php b/app/Library/Helper.php index 709266c8..af1d528a 100644 --- a/app/Library/Helper.php +++ b/app/Library/Helper.php @@ -281,9 +281,12 @@ function kg_parse_markdown($content) return sprintf('/img/content/%s!content_800)', trim($matches[1])); }, $content); - $parser = new HyperDown\Parser(); + $parser = new League\CommonMark\GithubFlavoredMarkdownConverter([ + 'html_input' => 'strip', + 'allow_unsafe_links' => false, + ]); - return $parser->makeHtml($content); + return $parser->convertToHtml($content); } /** diff --git a/composer.json b/composer.json index c9e31928..f5ff6f3e 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ "xiaochong0302/ip2region": "^1.0", "robmorgan/phinx": "^0.12", "overtrue/wechat": "^4.2", - "joyqi/hyper-down": "dev-master", - "endroid/qr-code": "^3.9" + "endroid/qr-code": "^3.9", + "league/commonmark": "^1.5" }, "require-dev": { "odan/phinx-migrations-generator": "^5.3", diff --git a/composer.lock b/composer.lock index 9d76bc72..f728973d 100644 --- a/composer.lock +++ b/composer.lock @@ -1,20 +1,20 @@ { - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "07711a198fccf51ba8195d53da4b61d8", - "packages": [ - { - "name": "bacon/bacon-qr-code", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "3e9d791b67d0a2912922b7b7c7312f4b37af41e4" - }, - "dist": { + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "e715dca0b2629f1a9c59a984206adf9f", + "packages": [ + { + "name": "bacon/bacon-qr-code", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "3e9d791b67d0a2912922b7b7c7312f4b37af41e4" + }, + "dist": { "type": "zip", "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/3e9d791b67d0a2912922b7b7c7312f4b37af41e4", "reference": "3e9d791b67d0a2912922b7b7c7312f4b37af41e4", @@ -1155,54 +1155,6 @@ }, "time": "2020-09-03T16:46:04+00:00" }, - { - "name": "joyqi/hyper-down", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/SegmentFault/HyperDown.git", - "reference": "1774a7bb8a3853503e44cfa5a2186b1943f6493f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/SegmentFault/HyperDown/zipball/1774a7bb8a3853503e44cfa5a2186b1943f6493f", - "reference": "1774a7bb8a3853503e44cfa5a2186b1943f6493f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.4.0" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "HyperDown\\": "./" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "authors": [ - { - "name": "joyqi", - "email": "joyqi@segmentfault.com" - } - ], - "description": "A light weight markdown parser library", - "support": { - "issues": "https://github.com/SegmentFault/HyperDown/issues", - "source": "https://github.com/SegmentFault/HyperDown/tree/master" - }, - "time": "2020-11-30T04:05:08+00:00" - }, { "name": "khanamiryan/qrcode-detector-decoder", "version": "1.0.4", @@ -1254,26 +1206,133 @@ "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", "keywords": [ "barcode", - "qr", - "zxing" + "qr", + "zxing" ], - "support": { - "issues": "https://github.com/khanamiryan/php-qrcode-detector-decoder/issues", - "source": "https://github.com/khanamiryan/php-qrcode-detector-decoder/tree/1.0.4" - }, - "time": "2020-11-29T18:50:26+00:00" + "support": { + "issues": "https://github.com/khanamiryan/php-qrcode-detector-decoder/issues", + "source": "https://github.com/khanamiryan/php-qrcode-detector-decoder/tree/1.0.4" + }, + "time": "2020-11-29T18:50:26+00:00" + }, + { + "name": "league/commonmark", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "11df9b36fd4f1d2b727a73bf14931d81373b9a54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/11df9b36fd4f1d2b727a73bf14931d81373b9a54", + "reference": "11df9b36fd4f1d2b727a73bf14931d81373b9a54", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.2", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" + }, + "bin": [ + "bin/commonmark" + ], + "type": "library", + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", + "type": "custom" }, { - "name": "monolog/monolog", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://www.patreon.com/colinodell", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2020-10-31T13:49:32+00:00" + }, + { + "name": "monolog/monolog", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", "shasum": "", "mirrors": [ @@ -5298,27 +5357,25 @@ "generator", "variable" ], - "support": { - "issues": "https://github.com/Riimu/Kit-PHPEncoder/issues", - "source": "https://github.com/Riimu/Kit-PHPEncoder/tree/v2.4.1" - }, - "time": "2020-11-29T16:53:17+00:00" + "support": { + "issues": "https://github.com/Riimu/Kit-PHPEncoder/issues", + "source": "https://github.com/Riimu/Kit-PHPEncoder/tree/v2.4.1" + }, + "time": "2020-11-29T16:53:17+00:00" } ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "joyqi/hyper-down": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "ext-phalcon": "~3.4", - "ext-redis": "~5.0", - "ext-pdo": "*", - "ext-json": "*", - "ext-fileinfo": "*" - }, - "platform-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "ext-phalcon": "~3.4", + "ext-redis": "~5.0", + "ext-pdo": "*", + "ext-json": "*", + "ext-fileinfo": "*" + }, + "platform-dev": [], "plugin-api-version": "2.0.0" }