Skip to content

Commit 521e514

Browse files
authored
升级到 v4.5.7 (#168)
* 升级到 v4.5.7 * update
1 parent 86ac3a4 commit 521e514

File tree

25 files changed

+188
-60
lines changed

25 files changed

+188
-60
lines changed

source/changelogs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
.. toctree::
1313
:titlesonly:
1414

15+
v4.5.7
16+
v4.5.6
1517
v4.5.5
1618
v4.5.4
1719
v4.5.3

source/changelogs/v4.5.6.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#############
2+
版本 4.5.6
3+
#############
4+
5+
发布日期:2024 年 12 月 28 日
6+
7+
**CodeIgniter4 的 4.5.6 版本发布**
8+
9+
.. contents::
10+
:local:
11+
:depth: 3
12+
13+
************
14+
已修复的 Bug
15+
************
16+
17+
- **RequestTrait:** 修复了 ``fetchGlobal()`` 方法在处理以列表形式存储的数据时,无法通过数字键处理数据的 bug。
18+
- **Session 类库:** 会话初始化的调试消息现在使用正确的日志类型 "debug" 而不是 "info"。
19+
- **验证:** 修复了 ``getValidated()`` 方法在使用多个星号的验证规则时未返回有效数据的 bug。
20+
- **数据库:** 修复了 ``like()`` 方法在处理带重音字符时的大小写不敏感选项。
21+
- **解析器:** 修复了导致相同键名被第一个定义的键名替换的 bug。
22+
- **DownloadResponse:** 修复了无法设置自定义缓存头的 bug。现在也可以使用 ``setCache()`` 方法。
23+
- **DownloadResponse:** 修复了涉及发送自定义 "Expires-Disposition" 头的 bug。
24+
- **路由:** 修复了当 `Routing::$translateURIDashes` 设置为 `true` 并且使用闭包定义路由时,`str_replace()` 中的 TypeError。
25+
- **验证:** 修复了复杂语言字符串未正确处理的问题。
26+
- **CURLRequest:** 添加了对使用非 1.1 版本的 HTTP 处理代理响应的支持。
27+
- **数据库:** 修复了 ``Postgre\Connection::reconnect()`` 方法在连接尚未建立时抛出错误的 bug。
28+
- **模型:** 修复了 ``Model::getIdValue()`` 方法在使用主键的数据映射时,无法正确识别 ``Entity`` 对象中主键的 bug。
29+
- **数据库:** 修复了预处理语句中的一个错误,以正确处理二进制数据。
30+
31+
查看仓库的
32+
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
33+
以获取完整的已修复 bug 列表。

source/changelogs/v4.5.7.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#############
2+
版本 4.5.7
3+
#############
4+
5+
发布日期:2024 年 12 月 31 日
6+
7+
**CodeIgniter4 的 4.5.7 版本发布**
8+
9+
.. contents::
10+
:local:
11+
:depth: 3
12+
13+
************
14+
已修复的 Bug
15+
************
16+
17+
- **Common:** 修复了 ``helper()`` 方法在有效的命名空间 helper 上可能抛出 `FileNotFoundException` 的 bug。
18+
- **Forge:** 修复了 `SQLite3` 的 Forge 在调用 ``dropColumn()`` 时总是返回 `false` 的问题。
19+
20+
查看仓库的
21+
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
22+
以获取完整的已修复 bug 列表。

source/concepts/factories.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,14 @@ setOptions 方法
280280

281281
public bool $configCacheEnabled = true;
282282

283-
自 v4.5.0 起,你可以使用 ``spark optimize`` 命令来启用此功能。
283+
或者你可以使用 ``spark optimize`` 命令来启用此功能。
284284

285285
.. note::
286286
此属性无法通过
287287
:ref:`环境变量 <configuration-classes-and-environment-variables>` 重写。
288288

289289
.. note::
290-
在 v4.5.0 之前,请在 **public/index.php** 中取消以下代码的注释::
290+
在 v4.4.x 中,请在 **public/index.php** 中取消以下代码的注释::
291291

292292
--- a/public/index.php
293293
+++ b/public/index.php

source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
version = '4.5'
2727

2828
# The full version, including alpha/beta/rc tags.
29-
release = '4.5.5'
29+
release = '4.5.7'
3030

3131
# -- General configuration ---------------------------------------------------
3232

source/database/queries.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ $db->error()
189189

190190
.. literalinclude:: queries/018.php
191191

192+
.. note:: 目前,唯一实际使用选项数组的数据库是 SQLSRV。
193+
192194
执行查询
193195
===================
194196

source/database/queries/016.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
$pQuery = $db->prepare(static function ($db) {
4-
return $db->table('user')->insert([
5-
'name' => 'x',
6-
'email' => 'y',
7-
'country' => 'US',
8-
]);
9-
});
3+
$pQuery = $db->prepare(static fn ($db) => $db->table('user')->insert([
4+
'name' => 'x',
5+
'email' => 'y',
6+
'country' => 'US',
7+
]));

source/database/queries/019.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?php
22

33
// Prepare the Query
4-
$pQuery = $db->prepare(static function ($db) {
5-
return $db->table('user')->insert([
6-
'name' => 'x',
7-
'email' => 'y',
8-
'country' => 'US',
9-
]);
10-
});
4+
$pQuery = $db->prepare(static fn ($db) => $db->table('user')->insert([
5+
'name' => 'x',
6+
'email' => 'y',
7+
'country' => 'US',
8+
]));
119

1210
// Collect the Data
1311
$name = 'John Doe';

source/dbmgmt/migration.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@
1414
迁移文件命名
1515
********************
1616

17-
每个迁移会按照创建时的数字顺序正向或反向运行,具体取决于采取的方法。每个迁移使用创建时的时间戳命名,格式为 **YYYY-MM-DD-HHIISS** (例如 **2012-10-31-100537**)。这有助于在团队环境下避免编号冲突
17+
迁移文件名由时间戳前缀、下划线(``_``)和描述性名称(类名)组成
1818

19-
为你的迁移文件添加迁移编号前缀,后跟下划线和对迁移的描述性名称。年、月、日可以用破折号、下划线或不加分隔符的方式分割。例如:
19+
* 2024-09-08-013653_AddBlogTable.php
20+
21+
每个迁移都使用创建迁移时的时间戳(**2024-09-08-013653**)进行编号,格式为 **YYYY-MM-DD-HHIISS**。
22+
23+
迁移的描述性名称(**AddBlogTable**)是 PHP 中的类名,因此你必须为其命名一个有效的类名。
24+
25+
前缀中的年、月、日和时间的分隔符可以是短横线(``-``)、下划线(``_``)或者不使用任何分隔符。例如:
2026

2127
* 2012-10-31-100538_AlterBlogTrackViews.php
2228
* 2012_10_31_100539_AlterBlogAddTranslations.php
2329
* 20121031100537_AddBlog.php
2430

31+
每个迁移根据所采取的方法按数字顺序向前或向后运行。这有助于在团队协作环境中避免编号冲突。
32+
2533
******************
2634
创建迁移
2735
******************
@@ -32,7 +40,7 @@
3240

3341
数据库连接和数据库 Forge 类都可以通过 ``$this->db`` 和 ``$this->forge`` 获取。
3442

35-
或者,你可以使用命令行调用来生成骨架迁移文件。更多细节请参阅 :ref:`command-line-tools` 中的 **make:migration**
43+
或者,你可以使用命令行调用来生成一个骨架迁移文件。更多详情请参阅 :ref:`command-line-tools` 中的 `make:migration`_
3644

3745
.. note:: 由于迁移类是一个 PHP 类,每个迁移文件中的类名必须是唯一的。
3846

source/general/ajax.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ React
5656
htmx
5757
====
5858

59-
你可以使用 ajax-header 扩展。
59+
你可以使用 `ajax-header <https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ajax-header/README.md>`_ 扩展。
6060

6161
.. code-block:: html
6262

0 commit comments

Comments
 (0)