From 60aa8e3f5b536dbc46568310c46005c6d0d1466c Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Mon, 9 Sep 2024 14:35:32 +0700 Subject: [PATCH 1/6] docs: improve Factories --- user_guide_src/source/concepts/factories.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/concepts/factories.rst b/user_guide_src/source/concepts/factories.rst index f98fd1726e38..4520d3a8cb43 100644 --- a/user_guide_src/source/concepts/factories.rst +++ b/user_guide_src/source/concepts/factories.rst @@ -334,14 +334,14 @@ Set the following property to ``true`` in **app/Config/Optimize.php**:: public bool $configCacheEnabled = true; -Since v4.5.0, you can enable this with the ``spark optimize`` command. +Or you can enable this with the ``spark optimize`` command. .. note:: This property cannot be overridden by :ref:`environment variables `. .. note:: - Prior to v4.5.0, uncomment the following code in **public/index.php**:: + Prior to v4.4.x, uncomment the following code in **public/index.php**:: --- a/public/index.php +++ b/public/index.php From b1d044e3581990d5d5dbf61d8fdf970dd1e462fe Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Tue, 10 Sep 2024 09:02:02 +0700 Subject: [PATCH 2/6] fix: only v4.4.x config must set manually --- user_guide_src/source/concepts/factories.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/concepts/factories.rst b/user_guide_src/source/concepts/factories.rst index 4520d3a8cb43..aaf7df459c6d 100644 --- a/user_guide_src/source/concepts/factories.rst +++ b/user_guide_src/source/concepts/factories.rst @@ -341,7 +341,7 @@ Or you can enable this with the ``spark optimize`` command. :ref:`environment variables `. .. note:: - Prior to v4.4.x, uncomment the following code in **public/index.php**:: + In v4.4.x, uncomment the following code in **public/index.php**:: --- a/public/index.php +++ b/public/index.php From a28b4bcd7cb66c33aaa16686c0053958dc076d53 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Tue, 1 Oct 2024 17:13:43 +0330 Subject: [PATCH 3/6] refactor: remove unnecessary `is_countable()` check in `getMethodParams` --- system/Router/RouteCollection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Router/RouteCollection.php b/system/Router/RouteCollection.php index 8fba39dc03be..231711c48aac 100644 --- a/system/Router/RouteCollection.php +++ b/system/Router/RouteCollection.php @@ -1604,7 +1604,7 @@ private function processArrayCallableSyntax(string $from, array $to): string private function getMethodParams(string $from): string { preg_match_all('/\(.+?\)/', $from, $matches); - $count = is_countable($matches[0]) ? count($matches[0]) : 0; + $count = count($matches[0]); $params = ''; From 86ddfaaf57a4832aa734571aaf62c1aaea78491f Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 2 Oct 2024 17:20:22 +0700 Subject: [PATCH 4/6] refactor: add more readonly property definitions on AutoRouteCollector and SiteURI --- .../Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php | 2 +- system/HTTP/SiteURI.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php index 579969346637..4c705fd439b1 100644 --- a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php +++ b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php @@ -36,7 +36,7 @@ public function __construct( private readonly string $defaultMethod, private readonly array $httpMethods, private readonly array $protectedControllers, - private string $prefix = '' + private readonly string $prefix = '' ) { } diff --git a/system/HTTP/SiteURI.php b/system/HTTP/SiteURI.php index def61b65e17b..ab0cdd19c955 100644 --- a/system/HTTP/SiteURI.php +++ b/system/HTTP/SiteURI.php @@ -41,7 +41,7 @@ class SiteURI extends URI /** * The Index File. */ - private string $indexPage; + private readonly string $indexPage; /** * List of URI segments in baseURL and indexPage. From d385aa0f04b92b9b32ea310180e7296ce044e714 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:13:54 +0000 Subject: [PATCH 5/6] chore(deps-dev): update rector/rector requirement from 1.2.5 to 1.2.6 Updates the requirements on [rector/rector](https://github.com/rectorphp/rector) to permit the latest version. - [Release notes](https://github.com/rectorphp/rector/releases) - [Commits](https://github.com/rectorphp/rector/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: rector/rector dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5f85a575b3b8..1caf40d2c832 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "phpunit/phpcov": "^9.0.2 || ^10.0", "phpunit/phpunit": "^10.5.16 || ^11.2", "predis/predis": "^1.1 || ^2.0", - "rector/rector": "1.2.5" + "rector/rector": "1.2.6" }, "replace": { "codeigniter4/framework": "self.version" From 57e8be9ab90722e28f87149eb547a693486ace50 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Thu, 3 Oct 2024 20:35:43 +0330 Subject: [PATCH 6/6] refactor: allow `null` for `$key` property to handle buffer cleanup in SodiumHandler --- system/Encryption/Handlers/SodiumHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Encryption/Handlers/SodiumHandler.php b/system/Encryption/Handlers/SodiumHandler.php index b6c74da76581..c74f2a5f0a48 100644 --- a/system/Encryption/Handlers/SodiumHandler.php +++ b/system/Encryption/Handlers/SodiumHandler.php @@ -26,7 +26,7 @@ class SodiumHandler extends BaseHandler /** * Starter key * - * @var string + * @var string|null Null is used for buffer cleanup. */ protected $key = '';