-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
226 changed files
with
1,848 additions
and
617 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
sphinx>=4.5.0,<5 | ||
sphinxcontrib-phpdomain>=0.8.0 | ||
docutils>=0.16 | ||
sphinx-rtd-theme>=0.5.0 | ||
jinja2<3.1 | ||
sphinx>=5.3.0,<6.0.0 | ||
sphinxcontrib-phpdomain>=0.11.0 | ||
docutils>=0.19 | ||
sphinx-rtd-theme>=2.0.0,<3.0.0 | ||
jinja2>=3.1.3,<4.0.0 | ||
jieba==0.42.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
.. toctree:: | ||
:titlesonly: | ||
|
||
v4.4.5 | ||
v4.4.4 | ||
v4.4.3 | ||
v4.4.2 | ||
v4.4.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
############# | ||
版本 4.4.4 | ||
############# | ||
|
||
发布日期:2023 年 12 月 28 日 | ||
|
||
**CodeIgniter4 的 4.4.4 版本发布** | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 3 | ||
|
||
******** | ||
重大变化 | ||
******** | ||
|
||
采用 Dot 数组语法进行验证 | ||
========================= | ||
|
||
使用通配符 ``*`` 的验证规则现在只验证符合"Dot 数组语法"的正确维度数据。 | ||
详见 :ref:`升级 <upgrade-444-validation-with-dot-array-syntax>` 获取详情。 | ||
|
||
验证规则匹配和差异 | ||
=================== | ||
|
||
在严格和传统规则中,``matches`` 和 ``differs`` 验证非字符串类型数据的情况已修复。 | ||
|
||
在 CURLRequest 中移除了 `ssl_key` 选项的使用 | ||
============================================ | ||
|
||
由于一个错误,我们在 CURLRequest 中使用了未记录的 `ssl_key` 配置选项来定义 CA bundle。现在已经修复,并且按照文档要求工作。你可以通过 `verify` 选项来定义你的 CA bundle。 | ||
|
||
文件系统助手 | ||
============= | ||
|
||
:php:func:`get_filenames()` 现在会跟踪符号连接文件夹,而之前只是返回而不跟踪。 | ||
|
||
******** | ||
改进 | ||
******** | ||
|
||
- 完全支持 PHP 8.3。 | ||
|
||
*************** | ||
消息变更 | ||
*************** | ||
|
||
- 添加 ``HTTP.invalidJSON`` 错误消息。 | ||
- 添加 ``HTTP.unsupportedJSONFormat`` 错误消息。 | ||
|
||
************ | ||
弃用 | ||
************ | ||
|
||
- **请求:** :php:meth:`CodeIgniter\\HTTP\\Request::getEnv()` 方法已被弃用。此方法自从一开始就没有工作,请使用 :php:func:`env()`。 | ||
|
||
************ | ||
已修复的错误 | ||
************ | ||
|
||
- **CURLRequest:** 修复了即使配置项 'verify' 设置为 *false* 时,也会检查主机名的错误。 | ||
|
||
要查看完整的错误修复列表,请去看仓库的 `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
############# | ||
版本 4.4.5 | ||
############# | ||
|
||
发布日期:2024 年 1 月 27 日 | ||
|
||
**CodeIgniter4 的 4.4.5 版本发布** | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 3 | ||
|
||
************ | ||
已修复的错误 | ||
************ | ||
|
||
- **QueryBuilder:** 修复了因为 PostgreSQL 上的类型错误,导致 ``updateBatch()`` 方法无法工作的问题。 | ||
|
||
要查看完整的错误修复列表,可以查看仓库的 `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$color = CLI::prompt('What is your favorite color?'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$color = CLI::prompt('What is your favorite color?', 'blue'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$overwrite = CLI::prompt('File exists. Overwrite?', ['y', 'n']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$email = CLI::prompt('What is your email?', null, 'required|valid_email'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$email = CLI::prompt('What is your email?', null, ['required', 'valid_email']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write('The rain in Spain falls mainly on the plains.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write('File created.', 'green'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write('File overwritten.', 'light_red', 'dark_gray'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
for ($i = 0; $i <= 10; $i++) { | ||
CLI::print($i); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write("fileA \t" . CLI::color('/path/to/file', 'white'), 'yellow'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::error('Cannot write to file: ' . $file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::color("task1\t", 'yellow'); | ||
CLI::wrap('Some long description goes here that might be longer than the current window.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
// Wrap the text at max 20 characters wide | ||
CLI::wrap($description, 20); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$titles = [ | ||
'task1a', | ||
'task1abc', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::newLine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::clearScreen(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$totalSteps = count($tasks); | ||
$currStep = 1; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$users = Factories::models('Blog\Models\UserModel'); | ||
// Or | ||
$users = Factories::models(\Blog\Models\UserModel::class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$conn = db_connect('auth'); | ||
$users = Factories::models('UserModel', [], $conn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$users = Factories::models('UserModel', ['getShared' => true]); // Default; will always be the same instance | ||
$other = Factories::models('UserModel', ['getShared' => false]); // Will always create a new instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$users = Factories::models('Blog\Models\UserModel', ['preferApp' => false]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$lib = Factories::libraries('Sub/SubLib'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
Factories::define('models', 'Myth\Auth\Models\UserModel', 'App\Models\UserModel'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
<?php | ||
|
||
// In app/Config/Events.php | ||
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect'); | ||
|
||
namespace Config; | ||
|
||
use CodeIgniter\Events\Events; | ||
use CodeIgniter\Exceptions\FrameworkException; | ||
use CodeIgniter\HotReloader\HotReloader; | ||
|
||
// ... | ||
|
||
Events::on( | ||
'DBQuery', | ||
static function (\CodeIgniter\Database\Query $query) { | ||
log_message('info', (string) $query); | ||
} | ||
); |
Oops, something went wrong.