From 86ac3a4d7b725ef62592ccb79b4bf12b3460febe Mon Sep 17 00:00:00 2001 From: Hex Date: Thu, 19 Sep 2024 17:44:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B0=20v4.5.5=20(#167)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/changelogs/index.rst | 1 + source/changelogs/v4.1.2.rst | 2 +- source/changelogs/v4.5.5.rst | 21 ++++ source/conf.py | 2 +- source/helpers/html_helper.rst | 97 ++++++++++--------- source/helpers/text_helper.rst | 4 +- source/helpers/text_helper/009.php | 2 +- source/helpers/text_helper/010.php | 2 +- source/incoming/routing.rst | 28 ++++++ source/incoming/routing/071.php | 14 +++ source/incoming/routing/072.php | 8 ++ source/installation/upgrade_455.rst | 39 ++++++++ source/installation/upgrade_models.rst | 16 ++- source/installation/upgrade_models/001.php | 17 +++- source/installation/upgrade_models/002.php | 26 +++++ .../upgrade_models/ci3sample/001.php | 16 +-- source/installation/upgrading.rst | 1 + source/libraries/curlrequest.rst | 9 +- source/libraries/curlrequest/028.php | 10 +- source/libraries/validation.rst | 4 + source/models/model.rst | 23 +++-- source/models/model/057.php | 2 +- source/outgoing/api_responses/002.php | 4 +- source/outgoing/localization.rst | 78 +++++++++++---- source/outgoing/localization/020.php | 4 + source/outgoing/localization/021.php | 5 + 26 files changed, 328 insertions(+), 107 deletions(-) create mode 100644 source/changelogs/v4.5.5.rst create mode 100644 source/incoming/routing/071.php create mode 100644 source/incoming/routing/072.php create mode 100644 source/installation/upgrade_455.rst create mode 100644 source/installation/upgrade_models/002.php create mode 100644 source/outgoing/localization/020.php create mode 100644 source/outgoing/localization/021.php diff --git a/source/changelogs/index.rst b/source/changelogs/index.rst index 5a68623e..d979f492 100644 --- a/source/changelogs/index.rst +++ b/source/changelogs/index.rst @@ -12,6 +12,7 @@ .. toctree:: :titlesonly: + v4.5.5 v4.5.4 v4.5.3 v4.5.2 diff --git a/source/changelogs/v4.1.2.rst b/source/changelogs/v4.1.2.rst index 9515cc3b..804e2968 100644 --- a/source/changelogs/v4.1.2.rst +++ b/source/changelogs/v4.1.2.rst @@ -56,7 +56,7 @@ - 统一并弃用 ``ControllerResponse`` 和 ``FeatureResponse``,改用 ``TestResponse``。 - 弃用 ``Time::instance()``,改用 ``Time::createFromInstance()`` (现在接受 ``DateTimeInterface``)。 - 弃用 ``IncomingRequest::removeRelativeDirectory()``,改用 ``URI::removeDotSegments()``。 -- 弃用 ``\API\ResponseTrait::failValidationError``,改用 ``\API\ResponseTrait::failValidationErrors``。 +- 弃用 ``\API\ResponseTrait::failValidationError()``,改用 ``\API\ResponseTrait::failValidationErrors()``。 错误修复 ---------- diff --git a/source/changelogs/v4.5.5.rst b/source/changelogs/v4.5.5.rst new file mode 100644 index 00000000..cbc09ea2 --- /dev/null +++ b/source/changelogs/v4.5.5.rst @@ -0,0 +1,21 @@ +############# +版本 4.5.5 +############# + +发布日期:2024 年 9 月 7 日 + +**CodeIgniter4 的 4.5.5 版本发布** + +.. contents:: + :local: + :depth: 3 + +********** +修复的错误 +********** + +- **URL 辅助函数:** 修复了 :php:func:`auto_link()` 中正则表达式过时的错误。通过此修复,现在使用与 CodeIgniter 3 相同的正则表达式。 + +请参阅仓库的 +`CHANGELOG.md `_ +以获取修复错误的完整列表。 diff --git a/source/conf.py b/source/conf.py index da89b8e9..af33866b 100755 --- a/source/conf.py +++ b/source/conf.py @@ -26,7 +26,7 @@ version = '4.5' # The full version, including alpha/beta/rc tags. -release = '4.5.4' +release = '4.5.5' # -- General configuration --------------------------------------------------- diff --git a/source/helpers/html_helper.rst b/source/helpers/html_helper.rst index 1f1931d5..7655ef3e 100755 --- a/source/helpers/html_helper.rst +++ b/source/helpers/html_helper.rst @@ -11,7 +11,7 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 配置 ============= -从 ``v4.3.0`` 开始, ``html_helper`` 函数中的空 HTML 元素(如 ````)默认为兼容 HTML5,如果你需要兼容 XHTML,必须在 **app/Config/DocTypes.php** 中将 ``$html5`` 属性设置为 ``false``。 +从 ``v4.3.0`` 开始, ``html_helper`` 函数中的空 HTML 标签(如 ````)默认为兼容 HTML5,如果你需要兼容 XHTML,必须在 **app/Config/DocTypes.php** 中将 ``$html5`` 属性设置为 ``false``。 加载此辅助函数 =================== @@ -30,24 +30,24 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param string|array $src: 图像源 URI,或属性和值的数组 :param bool $indexPage: 是否将 ``$src`` 视为路由的 URI 字符串 :param mixed $attributes: 其他 HTML 属性 - :returns: HTML 图像标签 + :returns: 一个 HTML img 标签 :rtype: string - 允许你创建 HTML ```` 标签。第一个参数包含图像源。示例: + 允许你创建 HTML ```` 标签。第一个参数包含图像源。示例: .. literalinclude:: html_helper/002.php - 有一个可选的第二个参数,它是一个 true/false 值,指定 *src* 是否应该添加由 ``$config['indexPage']`` 指定的页面地址。这可能是如果你使用媒体控制器的情况: + 有一个可选的第二个参数,一个 true/false 值,用于指定是否应在创建的地址中添加 ``Config\App::$indexPage`` 到 *src*。假设你在使用一个媒体控制器: .. literalinclude:: html_helper/003.php - 另外,可以将关联数组作为第一个参数传递,以完全控制所有属性和值。如果没有提供 *alt* 属性,CodeIgniter 将生成一个空字符串。 + 此外,可以将一个关联数组作为第一个参数传递,以完全控制所有属性和值。如果没有提供 *alt* 属性,CodeIgniter 将生成一个空字符串的 *alt* 属性。 示例: .. literalinclude:: html_helper/004.php -.. php:function:: img_data([$src = ''[, $indexPage = false[, $attributes = '']]]) +.. php:function:: img_data($path[, $mime = null]) :param string $path: 图像文件路径 :param string|null $mime: 要使用的 MIME 类型,如果为 null 将猜测 @@ -73,10 +73,10 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param string $media: 媒体类型 :param bool $indexPage: 是否将 ``$src`` 视为路由的 URI 字符串 :param string $hreflang: Hreflang 类型 - :returns: HTML 链接标签 + :returns: 一个 HTML link 标签 :rtype: string - 允许你创建 HTML ```` 标签。这对于样式表链接很有用,也用于其他链接。参数是 *href*,可选的 *rel*、*type*、*title*、*media* 和 *indexPage*。 + 允许你创建 HTML ```` 标签。这对于样式表链接很有用,也用于其他链接。参数是 *href*,可选的 *rel*、*type*、*title*、*media* 和 *indexPage*。 *indexPage* 是一个布尔值,指定 *href* 是否应该添加由 ``$config['indexPage']`` 指定的页面地址。 @@ -96,10 +96,10 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param array|string $src: JavaScript 文件的源名称或 URL,或指定属性的关联数组 :param bool $indexPage: 是否将 ``$src`` 视为路由的 URI 字符串 - :returns: HTML script 标签 + :returns: 一个 HTML script 标签 :rtype: string - 允许你创建 HTML ```` 标签。参数是 *src*,可选的 *indexPage*。 + 允许你创建 HTML ``