diff --git a/source/changelogs/index.rst b/source/changelogs/index.rst index d979f492..2d00c68e 100644 --- a/source/changelogs/index.rst +++ b/source/changelogs/index.rst @@ -12,6 +12,8 @@ .. toctree:: :titlesonly: + v4.5.7 + v4.5.6 v4.5.5 v4.5.4 v4.5.3 diff --git a/source/changelogs/v4.5.6.rst b/source/changelogs/v4.5.6.rst new file mode 100644 index 00000000..d044edc7 --- /dev/null +++ b/source/changelogs/v4.5.6.rst @@ -0,0 +1,33 @@ +############# +版本 4.5.6 +############# + +发布日期:2024 年 12 月 28 日 + +**CodeIgniter4 的 4.5.6 版本发布** + +.. contents:: + :local: + :depth: 3 + +************ +已修复的 Bug +************ + +- **RequestTrait:** 修复了 ``fetchGlobal()`` 方法在处理以列表形式存储的数据时,无法通过数字键处理数据的 bug。 +- **Session 类库:** 会话初始化的调试消息现在使用正确的日志类型 "debug" 而不是 "info"。 +- **验证:** 修复了 ``getValidated()`` 方法在使用多个星号的验证规则时未返回有效数据的 bug。 +- **数据库:** 修复了 ``like()`` 方法在处理带重音字符时的大小写不敏感选项。 +- **解析器:** 修复了导致相同键名被第一个定义的键名替换的 bug。 +- **DownloadResponse:** 修复了无法设置自定义缓存头的 bug。现在也可以使用 ``setCache()`` 方法。 +- **DownloadResponse:** 修复了涉及发送自定义 "Expires-Disposition" 头的 bug。 +- **路由:** 修复了当 `Routing::$translateURIDashes` 设置为 `true` 并且使用闭包定义路由时,`str_replace()` 中的 TypeError。 +- **验证:** 修复了复杂语言字符串未正确处理的问题。 +- **CURLRequest:** 添加了对使用非 1.1 版本的 HTTP 处理代理响应的支持。 +- **数据库:** 修复了 ``Postgre\Connection::reconnect()`` 方法在连接尚未建立时抛出错误的 bug。 +- **模型:** 修复了 ``Model::getIdValue()`` 方法在使用主键的数据映射时,无法正确识别 ``Entity`` 对象中主键的 bug。 +- **数据库:** 修复了预处理语句中的一个错误,以正确处理二进制数据。 + +查看仓库的 +`CHANGELOG.md `_ +以获取完整的已修复 bug 列表。 diff --git a/source/changelogs/v4.5.7.rst b/source/changelogs/v4.5.7.rst new file mode 100644 index 00000000..8e651fa2 --- /dev/null +++ b/source/changelogs/v4.5.7.rst @@ -0,0 +1,22 @@ +############# +版本 4.5.7 +############# + +发布日期:2024 年 12 月 31 日 + +**CodeIgniter4 的 4.5.7 版本发布** + +.. contents:: + :local: + :depth: 3 + +************ +已修复的 Bug +************ + +- **Common:** 修复了 ``helper()`` 方法在有效的命名空间 helper 上可能抛出 `FileNotFoundException` 的 bug。 +- **Forge:** 修复了 `SQLite3` 的 Forge 在调用 ``dropColumn()`` 时总是返回 `false` 的问题。 + +查看仓库的 +`CHANGELOG.md `_ +以获取完整的已修复 bug 列表。 diff --git a/source/concepts/factories.rst b/source/concepts/factories.rst index 80745040..881b8d8e 100644 --- a/source/concepts/factories.rst +++ b/source/concepts/factories.rst @@ -280,14 +280,14 @@ setOptions 方法 public bool $configCacheEnabled = true; -自 v4.5.0 起,你可以使用 ``spark optimize`` 命令来启用此功能。 +或者你可以使用 ``spark optimize`` 命令来启用此功能。 .. note:: 此属性无法通过 :ref:`环境变量 ` 重写。 .. note:: - 在 v4.5.0 之前,请在 **public/index.php** 中取消以下代码的注释:: + 在 v4.4.x 中,请在 **public/index.php** 中取消以下代码的注释:: --- a/public/index.php +++ b/public/index.php diff --git a/source/conf.py b/source/conf.py index af33866b..82a86139 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.5' +release = '4.5.7' # -- General configuration --------------------------------------------------- diff --git a/source/database/queries.rst b/source/database/queries.rst index c88ecb24..091aa79e 100755 --- a/source/database/queries.rst +++ b/source/database/queries.rst @@ -189,6 +189,8 @@ $db->error() .. literalinclude:: queries/018.php +.. note:: 目前,唯一实际使用选项数组的数据库是 SQLSRV。 + 执行查询 =================== diff --git a/source/database/queries/016.php b/source/database/queries/016.php index f674f7c7..61c743fd 100644 --- a/source/database/queries/016.php +++ b/source/database/queries/016.php @@ -1,9 +1,7 @@ prepare(static function ($db) { - return $db->table('user')->insert([ - 'name' => 'x', - 'email' => 'y', - 'country' => 'US', - ]); -}); +$pQuery = $db->prepare(static fn ($db) => $db->table('user')->insert([ + 'name' => 'x', + 'email' => 'y', + 'country' => 'US', +])); diff --git a/source/database/queries/019.php b/source/database/queries/019.php index 28729f2e..8157a5d0 100644 --- a/source/database/queries/019.php +++ b/source/database/queries/019.php @@ -1,13 +1,11 @@ prepare(static function ($db) { - return $db->table('user')->insert([ - 'name' => 'x', - 'email' => 'y', - 'country' => 'US', - ]); -}); +$pQuery = $db->prepare(static fn ($db) => $db->table('user')->insert([ + 'name' => 'x', + 'email' => 'y', + 'country' => 'US', +])); // Collect the Data $name = 'John Doe'; diff --git a/source/dbmgmt/migration.rst b/source/dbmgmt/migration.rst index 766f4811..316e45f4 100644 --- a/source/dbmgmt/migration.rst +++ b/source/dbmgmt/migration.rst @@ -14,14 +14,22 @@ 迁移文件命名 ******************** -每个迁移会按照创建时的数字顺序正向或反向运行,具体取决于采取的方法。每个迁移使用创建时的时间戳命名,格式为 **YYYY-MM-DD-HHIISS** (例如 **2012-10-31-100537**)。这有助于在团队环境下避免编号冲突。 +迁移文件名由时间戳前缀、下划线(``_``)和描述性名称(类名)组成。 -为你的迁移文件添加迁移编号前缀,后跟下划线和对迁移的描述性名称。年、月、日可以用破折号、下划线或不加分隔符的方式分割。例如: +* 2024-09-08-013653_AddBlogTable.php + +每个迁移都使用创建迁移时的时间戳(**2024-09-08-013653**)进行编号,格式为 **YYYY-MM-DD-HHIISS**。 + +迁移的描述性名称(**AddBlogTable**)是 PHP 中的类名,因此你必须为其命名一个有效的类名。 + +前缀中的年、月、日和时间的分隔符可以是短横线(``-``)、下划线(``_``)或者不使用任何分隔符。例如: * 2012-10-31-100538_AlterBlogTrackViews.php * 2012_10_31_100539_AlterBlogAddTranslations.php * 20121031100537_AddBlog.php +每个迁移根据所采取的方法按数字顺序向前或向后运行。这有助于在团队协作环境中避免编号冲突。 + ****************** 创建迁移 ****************** @@ -32,7 +40,7 @@ 数据库连接和数据库 Forge 类都可以通过 ``$this->db`` 和 ``$this->forge`` 获取。 -或者,你可以使用命令行调用来生成骨架迁移文件。更多细节请参阅 :ref:`command-line-tools` 中的 **make:migration**。 +或者,你可以使用命令行调用来生成一个骨架迁移文件。更多详情请参阅 :ref:`command-line-tools` 中的 `make:migration`_。 .. note:: 由于迁移类是一个 PHP 类,每个迁移文件中的类名必须是唯一的。 diff --git a/source/general/ajax.rst b/source/general/ajax.rst index 9a7adf88..bda45945 100644 --- a/source/general/ajax.rst +++ b/source/general/ajax.rst @@ -56,7 +56,7 @@ React htmx ==== -你可以使用 ajax-header 扩展。 +你可以使用 `ajax-header `_ 扩展。 .. code-block:: html diff --git a/source/helpers/html_helper.rst b/source/helpers/html_helper.rst index 7655ef3e..a15be62f 100755 --- a/source/helpers/html_helper.rst +++ b/source/helpers/html_helper.rst @@ -28,7 +28,7 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 .. php:function:: img([$src = ''[, $indexPage = false[, $attributes = '']]]) :param string|array $src: 图像源 URI,或属性和值的数组 - :param bool $indexPage: 是否将 ``$src`` 视为路由的 URI 字符串 + :param bool $indexPage: 是否应该将 ``Config\App::$indexPage`` 添加到源路径中 :param mixed $attributes: 其他 HTML 属性 :returns: 一个 HTML img 标签 :rtype: string @@ -71,14 +71,14 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param string $type: 相关文档的类型 :param string $title: 链接标题 :param string $media: 媒体类型 - :param bool $indexPage: 是否将 ``$src`` 视为路由的 URI 字符串 + :param bool $indexPage: 是否应该将 indexPage 添加到链接路径中 :param string $hreflang: Hreflang 类型 :returns: 一个 HTML link 标签 :rtype: string - 允许你创建 HTML ```` 标签。这对于样式表链接很有用,也用于其他链接。参数是 *href*,可选的 *rel*、*type*、*title*、*media* 和 *indexPage*。 + 允许你创建 HTML ```` 标签。这对于样式表链接很有用,也用于其他链接。参数是 *href*,可选的 *rel*、*type*、*title*、*media*、*indexPage* 和 *hreflang*。 - *indexPage* 是一个布尔值,指定 *href* 是否应该添加由 ``$config['indexPage']`` 指定的页面地址。 + *indexPage* 是一个布尔值,指定 *href* 是否应该添加由 ``$config['indexPage']`` 指定的页面地址。 示例: @@ -198,7 +198,7 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param string $unsupportedMessage: 如果浏览器不支持 video 标签应显示的消息 :param string $attributes: HTML 属性 :param array $tracks: 在数组内使用 track 函数。参见 :php:func:`track()` 函数 - :param bool $indexPage: + :param bool $indexPage: 是否应该将 indexPage 添加到视频源路径中 :returns: 一个 HTML video 标签 :rtype: string @@ -236,7 +236,7 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param string $unsupportedMessage: 如果浏览器不支持 audio 标签应显示的消息 :param string $attributes: :param array $tracks: 在数组内使用 track 函数。参见 :php:func:`track()` 函数 - :param bool $indexPage: + :param bool $indexPage: 是否应该将 indexPage 添加到音频源路径中 :returns: 一个 HTML audio 标签 :rtype: string @@ -259,7 +259,7 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param string $src: 要嵌入的资源路径 :param bool $type: MIME 类型 :param array $attributes: HTML 属性 - :param bool $indexPage: + :param bool $indexPage: 是否应该将 indexPage 添加到源路径中 :returns: 一个 HTML embed 标签 :rtype: string @@ -272,6 +272,7 @@ HTML 辅助函数文件包含了帮助处理 HTML 的函数。 :param string $data: 资源 URL :param bool $type: 资源的内容类型 :param array $attributes: HTML 属性 + :param bool $indexPage: 是否应该将 indexPage 添加到资源 URL 中 :param array $params: 在数组中使用 param 函数。参见 :php:func:`param()` 函数 :returns: 一个 HTML object 标签 :rtype: string diff --git a/source/helpers/url_helper.rst b/source/helpers/url_helper.rst index a027d2ec..b17efa73 100755 --- a/source/helpers/url_helper.rst +++ b/source/helpers/url_helper.rst @@ -21,7 +21,7 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: site_url([$uri = ''[, $protocol = null[, $altConfig = null]]]) :param array|string $uri: URI 字符串或 URI 段数组 - :param string $protocol: 协议,例如 'http' 或 'https'。如果设置为空字符串 '',则返回一个 protocol-relative 链接。 + :param string $protocol: 协议,例如 ``'http'`` 或 ``'https'``。如果设置为空字符串 ``''``,则返回一个 protocol-relative 链接。 :param \\Config\\App $altConfig: 要使用的备用配置 :returns: 站点 URL :rtype: string @@ -49,7 +49,7 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: base_url([$uri = ''[, $protocol = null]]) :param array|string $uri: URI 字符串或 URI 段数组 - :param string $protocol: 协议,例如 'http' 或 'https'。如果设置为空字符串 '',则返回一个 protocol-relative 链接。 + :param string $protocol: 协议,例如 ``'http'`` 或 ``'https'``。如果设置为空字符串 ``''``,则返回一个 protocol-relative 链接。 :returns: Base URL :rtype: string @@ -107,7 +107,7 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 :param boolean $returnObject: 如果希望返回 URI 实例而不是字符串,则为 True。 :returns: 用户之前所在的 URL - :rtype: string|mixed|\\CodeIgniter\\HTTP\\URI + :rtype: string|\\CodeIgniter\\HTTP\\URI 返回用户之前完整的 URL(包括段)。 @@ -157,10 +157,10 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: anchor([$uri = ''[, $title = ''[, $attributes = ''[, $altConfig = null]]]]) - :param mixed $uri: URI字符串或URI段数组 - :param string $title: 锚点标题 - :param mixed $attributes: HTML属性 - :param \\Config\\App $altConfig: 要使用的备用配置 + :param array|string $uri: URI字符串或URI段数组 + :param string $title: 锚点标题 + :param array|object|string $attributes: HTML属性 + :param \\Config\\App|null $altConfig: 要使用的备用配置 :returns: HTML链接(锚点标签) :rtype: string @@ -184,10 +184,10 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: anchor_popup([$uri = ''[, $title = ''[, $attributes = false[, $altConfig = null]]]]) - :param string $uri: URI字符串 - :param string $title: 锚点标题 - :param mixed $attributes: HTML属性 - :param \\Config\\App $altConfig: 要使用的备用配置 + :param string $uri: URI字符串 + :param string $title: 锚点标题 + :param array|false|object|string $attributes: HTML属性 + :param \\Config\\App $altConfig: 要使用的备用配置 :returns: 弹出式超链接 :rtype: string @@ -211,9 +211,9 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: mailto($email[, $title = ''[, $attributes = '']]) - :param string $email: 电子邮件地址 - :param string $title: 锚点标题 - :param mixed $attributes: HTML属性 + :param string $email: 电子邮件地址 + :param string $title: 锚点标题 + :param array|object|string $attributes: HTML属性 :returns: “发送邮件到”超链接 :rtype: string @@ -229,9 +229,9 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: safe_mailto($email[, $title = ''[, $attributes = '']]) - :param string $email: 电子邮件地址 - :param string $title: 锚点标题 - :param mixed $attributes: HTML属性 + :param string $email: 电子邮件地址 + :param string $title: 锚点标题 + :param array|object|string $attributes: HTML属性 :returns: 防垃圾邮件的“发送邮件到”超链接 :rtype: string @@ -240,7 +240,7 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: auto_link($str[, $type = 'both'[, $popup = false]]) :param string $str: 输入字符串 - :param string $type: 链接类型('email'、'url' 或 'both') + :param string $type: 链接类型(``'email'``、``'url'`` 或 ``'both'``) :param bool $popup: 是否创建弹出链接 :returns: 链接化的字符串 :rtype: string @@ -315,7 +315,7 @@ URL 辅助函数文件包含帮助使用 URL 的函数。 .. php:function:: url_to($controller[, ...$args]) :param string $controller: 路由名称或 Controller::method - :param mixed ...$args: 要传递给路由的一个或多个参数。最后一个参数允许你设置区域设置。 + :param int|string ...$args: 要传递给路由的一个或多个参数。最后一个参数允许你设置区域设置。 :returns: 绝对 URL :rtype: string diff --git a/source/incoming/filters.rst b/source/incoming/filters.rst index 6cfbad6a..edef9b07 100644 --- a/source/incoming/filters.rst +++ b/source/incoming/filters.rst @@ -103,7 +103,7 @@ $required 本章节允许你定义 **Required Filters** (必需过滤器)。它们是应用于框架所做的每个请求的特殊过滤器。它们在其他种类的过滤器之前和之后应用,这些过滤器将在下面解释。 -.. note:: Required Filters 总是会执行,即使路由不存在。 +.. note:: Required Filters 总是会被执行。然而,如果路由不存在,则只会执行 Before Filters。 你应该注意在这里使用的数量,因为在每个请求上运行太多可能会带来性能影响。但默认设置的过滤器提供了框架功能。如果移除,这些功能将不再工作。详细信息请参见 :ref:`provided-filters`。 diff --git a/source/installation/upgrade_455.rst b/source/installation/upgrade_455.rst index bcea4a41..cccdc78a 100644 --- a/source/installation/upgrade_455.rst +++ b/source/installation/upgrade_455.rst @@ -29,11 +29,11 @@ 配置 ------ -- composer.json +- preload.php 所有更改 =========== 这是 **项目空间** 中所有收到更改的文件列表;许多只是简单的注释或格式调整,对运行时没有影响: -- composer.json +- preload.php diff --git a/source/installation/upgrade_456.rst b/source/installation/upgrade_456.rst new file mode 100644 index 00000000..b0acbed6 --- /dev/null +++ b/source/installation/upgrade_456.rst @@ -0,0 +1,33 @@ +############################# +从 4.5.5 升级到 4.5.6 +############################# + +请参考与你的安装方法对应的升级说明。 + +- :ref:`Composer 安装 App Starter 升级 ` +- :ref:`Composer 安装 将 CodeIgniter4 添加到现有项目 升级 ` +- :ref:`手动安装 升级 ` + +.. contents:: + :local: + :depth: 2 + +************* +项目文件 +************* + +**项目空间** (root、app、public、writable)中的一些文件已更新。由于这些文件位于 **system** 范围之外,它们不会在没有你干预的情况下被更改。 + +.. note:: 有一些第三方 CodeIgniter 模块可用于帮助合并项目空间的更改: + `在 Packagist 上探索 `_。 + +所有更改 +=========== + +这是 **项目空间** 中所有已更改文件的列表;许多更改只是注释或格式调整,不会影响运行时: + +- app/Config/Events.php +- app/Config/Format.php +- app/Controllers/BaseController.php +- app/Views/errors/cli/error_exception.php +- app/Views/errors/html/error_exception.php diff --git a/source/installation/upgrade_457.rst b/source/installation/upgrade_457.rst new file mode 100644 index 00000000..c041c977 --- /dev/null +++ b/source/installation/upgrade_457.rst @@ -0,0 +1,29 @@ +############################# +从 4.5.6 升级到 4.5.7 +############################# + +请参考与你的安装方法对应的升级说明。 + +- :ref:`Composer 安装 App Starter 升级 ` +- :ref:`Composer 安装 将 CodeIgniter4 添加到现有项目 升级 ` +- :ref:`手动安装 升级 ` + +.. contents:: + :local: + :depth: 2 + +************* +项目文件 +************* + +**项目空间** (root、app、public、writable)中的一些文件已更新。由于这些文件位于 **system** 范围之外,它们不会在没有你干预的情况下被更改。 + +.. note:: 有一些第三方 CodeIgniter 模块可用于帮助合并项目空间的更改: + `在 Packagist 上探索 `_。 + +所有更改 +=========== + +这是 **项目空间** 中所有已更改文件的列表;许多更改只是注释或格式调整,不会影响运行时: + +- app/Views/errors/cli/error_exception.php diff --git a/source/installation/upgrading.rst b/source/installation/upgrading.rst index b0886b97..40a41cb3 100755 --- a/source/installation/upgrading.rst +++ b/source/installation/upgrading.rst @@ -14,6 +14,8 @@ backward_compatibility_notes + upgrade_457 + upgrade_456 upgrade_455 upgrade_454 upgrade_453 diff --git a/source/libraries/pagination.rst b/source/libraries/pagination.rst index 01c3c126..a7621f4e 100755 --- a/source/libraries/pagination.rst +++ b/source/libraries/pagination.rst @@ -121,7 +121,7 @@ CodeIgniter 提供了一个非常简单但灵活的分页库,它易于主题化, 请注意: ``$segment`` 值不能大于 URI 段数加 1。 -如果你需要在一页上显示多个分页器,那么定义组的额外参数可能会有所帮助: +如果你需要在一个页面上显示多个分页器,那么可以使用额外的参数来定义一个分组,这可能会很有帮助: .. literalinclude:: pagination/007.php @@ -184,7 +184,7 @@ CodeIgniter 提供了一个非常简单但灵活的分页库,它易于主题化, setSurroundCount() ------------------ -在第一行中, ``setSurroundCount()`` 方法指定我们希望在当前页面链接的两侧显示两个链接。它只接受显示链接数的参数。 +在第一行中,``setSurroundCount()`` 方法指定我们希望在当前页面链接的两侧各显示两个链接。它接受的唯一参数是要显示的链接数量。 .. note:: 你必须首先调用此方法来生成正确的分页链接。 @@ -229,7 +229,7 @@ links() 如果你要使用上一页和下一页将链接到当前页面基于当前页面的上一页和下一页的分页结构,只需分别用 `getPreviousPage() & getNextPage()`_ 替换 `getPrevious() & getNext()`_,以及分别用 `hasPreviousPage() & hasNextPage()`_ 替换 `hasPrevious() & hasNext()`_。 -请参阅以下示例及其更改: +请参阅以下包含这些更改的示例: .. literalinclude:: pagination/014.php diff --git a/source/models/model/006.php b/source/models/model/006.php index c4440cf7..12f1364b 100644 --- a/source/models/model/006.php +++ b/source/models/model/006.php @@ -1,3 +1,3 @@ find($user_id); +$user = $userModel->find($userId); diff --git a/source/models/model/008.php b/source/models/model/008.php index 981f8871..1b7b52fe 100644 --- a/source/models/model/008.php +++ b/source/models/model/008.php @@ -1,3 +1,3 @@ findColumn($column_name); +$user = $userModel->findColumn($columnName); diff --git a/source/models/model/046.php b/source/models/model/046.php index 13b84dc5..909db8e9 100644 --- a/source/models/model/046.php +++ b/source/models/model/046.php @@ -1,3 +1,3 @@ escape($name); +$userName = $userModel->escape($name); diff --git a/source/testing/controllers.rst b/source/testing/controllers.rst index e3b17f9f..548ae2ee 100644 --- a/source/testing/controllers.rst +++ b/source/testing/controllers.rst @@ -79,7 +79,7 @@ withLogger($logger) 如果未提供,将使用具有默认配置值的新的 Logger 实例传入控制器。 -withURI(string $uri) +withUri(string $uri) -------------------- 允许你提供新的 URI,模拟客户端访问此控制器时的 URL。如果你需要在控制器中检查 URI 片段,这很有帮助。唯一的参数是一个表示有效 URI 的字符串: diff --git a/source/testing/controllers/002.php b/source/testing/controllers/002.php index 13701910..f84b1e03 100644 --- a/source/testing/controllers/002.php +++ b/source/testing/controllers/002.php @@ -13,7 +13,7 @@ class ForumControllerTest extends CIUnitTestCase public function testShowCategories() { - $result = $this->withURI('http://example.com/categories') + $result = $this->withUri('http://example.com/categories') ->controller(ForumController::class) ->execute('showCategories'); diff --git a/source/testing/controllers/009.php b/source/testing/controllers/009.php index 711d947b..71040248 100644 --- a/source/testing/controllers/009.php +++ b/source/testing/controllers/009.php @@ -1,5 +1,5 @@ withURI('http://example.com/forums/categories') +$results = $this->withUri('http://example.com/forums/categories') ->controller(\App\Controllers\ForumController::class) ->execute('showCategories'); diff --git a/source/tutorial/create_news_items/001.php b/source/tutorial/create_news_items/001.php index 3fc800af..02e2861e 100644 --- a/source/tutorial/create_news_items/001.php +++ b/source/tutorial/create_news_items/001.php @@ -8,7 +8,7 @@ class Filters extends BaseConfig { // ... - public $methods = [ + public array $methods = [ 'POST' => ['csrf'], ];