From 695829c52f200fe39190a3fc2fd91876238491ae Mon Sep 17 00:00:00 2001 From: TechnoKa <111047401+TechnoKaa@users.noreply.github.com> Date: Mon, 2 Dec 2024 07:18:38 +0100 Subject: [PATCH 1/3] Update create_news_items/001.php (#9297) Updated Filters configuration to explicitly declare the $methods property as an array, ensuring compatibility with strict typing in PHP. --- user_guide_src/source/tutorial/create_news_items/001.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/tutorial/create_news_items/001.php b/user_guide_src/source/tutorial/create_news_items/001.php index 3fc800af1a22..02e2861e9ac2 100644 --- a/user_guide_src/source/tutorial/create_news_items/001.php +++ b/user_guide_src/source/tutorial/create_news_items/001.php @@ -8,7 +8,7 @@ class Filters extends BaseConfig { // ... - public $methods = [ + public array $methods = [ 'POST' => ['csrf'], ]; From 8cf0fa1593f0d0e7c94c8da7fd0bdb5215475fe4 Mon Sep 17 00:00:00 2001 From: Osman Bozdag Date: Mon, 2 Dec 2024 12:49:38 +0100 Subject: [PATCH 2/3] docs: Fix $indexPage param explanations in helpers/html_helper.rst (#9162) --- user_guide_src/source/helpers/html_helper.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 47a8b791048e..62766012e0bf 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -28,9 +28,9 @@ The following functions are available: .. php:function:: img([$src = ''[, $indexPage = false[, $attributes = '']]]) :param string|array $src: Image source URI, or array of attributes and values - :param bool $indexPage: Whether to treat ``$src`` as a routed URI string + :param bool $indexPage: Should ``Config\App::$indexPage`` be added to the source path :param mixed $attributes: Additional HTML attributes - :returns: HTML image element + :returns: An HTML image element :rtype: string Lets you create HTML ```` elements. The first parameter contains the @@ -80,14 +80,14 @@ The following functions are available: :param string $type: Type of the related document :param string $title: Link title :param string $media: Media type - :param bool $indexPage: Whether to treat ``$src`` as a routed URI string + :param bool $indexPage: Should indexPage be added to the link path :param string $hreflang: Hreflang type :returns: An HTML link element :rtype: string Lets you create HTML ```` elements. This is useful for stylesheet links, as well as other links. The parameters are *href*, with optional *rel*, - *type*, *title*, *media* and *indexPage*. + *type*, *title*, *media*, *indexPage* and *hreflang*. *indexPage* is a boolean value that specifies if the *href* should have the page specified by ``$config['indexPage']`` added to the address it creates. @@ -215,7 +215,7 @@ The following functions are available: :param string $unsupportedMessage: The message to display if the video element is not supported by the browser :param string $attributes: HTML attributes :param array $tracks: Use the track function inside an array. See :php:func:`track()` function - :param bool $indexPage: + :param bool $indexPage: Should indexPage be added to the video source path :returns: An HTML video element :rtype: string @@ -254,7 +254,7 @@ The following functions are available: :param string $unsupportedMessage: The message to display if the audio element is not supported by the browser :param string $attributes: :param array $tracks: Use the track function inside an array. See :php:func:`track()` function - :param bool $indexPage: + :param bool $indexPage: Should indexPage be added to the audio source path :returns: An HTML audio element :rtype: string @@ -278,7 +278,7 @@ The following functions are available: :param string $src: The path of the resource to embed :param bool $type: MIME-type :param array $attributes: HTML attributes - :param bool $indexPage: + :param bool $indexPage: Should indexPage be added to the source path :returns: An HTML embed element :rtype: string @@ -292,6 +292,7 @@ The following functions are available: :param string $data: A resource URL :param bool $type: Content-type of the resource :param array $attributes: HTML attributes + :param bool $indexPage: Should indexPage be added to the resource URL :param array $params: Use the param function inside an array. See :php:func:`param()` function :returns: An HTML object element :rtype: string From 0d3c3b1197272f7d25f456a059d930dfb84828d1 Mon Sep 17 00:00:00 2001 From: Michal Sniatala Date: Wed, 4 Dec 2024 07:44:14 +0100 Subject: [PATCH 3/3] docs: update note about required filters (#9298) * docs: update note about required filters * Update user_guide_src/source/incoming/filters.rst Co-authored-by: John Paul E. Balandan, CPA --------- Co-authored-by: John Paul E. Balandan, CPA --- user_guide_src/source/incoming/filters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/incoming/filters.rst b/user_guide_src/source/incoming/filters.rst index 737fd191392a..14b110e34a12 100644 --- a/user_guide_src/source/incoming/filters.rst +++ b/user_guide_src/source/incoming/filters.rst @@ -132,7 +132,7 @@ They are special filters that are applied to every request made by the framework. They are applied before and after other kinds of filters that are explained below. -.. note:: The Required Filters are always executed even if a route does not exist. +.. note:: The Required Filters are always executed. However, if the route does not exist, only the Before Filters are executed. You should take care with how many you use here, since it could have performance implications to have too many run on every request. But the filters set by default