From 1fb9af8ba1be96b52132a42be656af0aac98a926 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sun, 15 Feb 2026 20:36:11 +0100 Subject: [PATCH 1/3] update php version --- composer.json | 4 ++-- composer.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index c22f1a1..70fc439 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "slack": "https://codeigniterchat.slack.com" }, "require": { - "php": "^8.1", + "php": "^8.2", "codeigniter4/cache": "^1.0", "codeigniter4/framework": "^4.2", "guzzlehttp/guzzle": "^7.0.1", @@ -59,7 +59,7 @@ "php-http/discovery": true }, "platform": { - "php": "8.1" + "php": "8.2" }, "optimize-autoloader": true, "preferred-install": "dist", diff --git a/composer.lock b/composer.lock index c64b7a1..e170f47 100644 --- a/composer.lock +++ b/composer.lock @@ -8693,11 +8693,11 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.1" + "php": "^8.2" }, "platform-dev": {}, "platform-overrides": { - "php": "8.1" + "php": "8.2" }, "plugin-api-version": "2.9.0" } From 91977b92f4943251c8bd78eb13f6bab30fb89f32 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sun, 15 Feb 2026 20:36:35 +0100 Subject: [PATCH 2/3] Patch framework (v4.6.4 => v4.7.0) --- app/Config/CURLRequest.php | 16 +++++++++ app/Config/Cache.php | 48 +++++++++++++++++++++---- app/Config/ContentSecurityPolicy.php | 52 ++++++++++++++++++++++++---- app/Config/Email.php | 5 +++ app/Config/Encryption.php | 17 +++++++++ app/Config/Format.php | 9 +++++ app/Config/Hostnames.php | 40 +++++++++++++++++++++ app/Config/Images.php | 2 ++ app/Config/Migrations.php | 15 ++++++++ app/Config/Optimize.php | 2 ++ app/Config/Paths.php | 12 +++++++ app/Config/Routing.php | 9 +++++ app/Config/Session.php | 1 + app/Config/Toolbar.php | 25 +++++++++++++ app/Config/UserAgents.php | 10 ++++++ app/Config/View.php | 17 +++++++++ app/Config/WorkerMode.php | 50 ++++++++++++++++++++++++++ public/index.php | 2 +- spark | 2 +- 19 files changed, 320 insertions(+), 14 deletions(-) create mode 100644 app/Config/Hostnames.php create mode 100644 app/Config/WorkerMode.php diff --git a/app/Config/CURLRequest.php b/app/Config/CURLRequest.php index 5a3d4e9..bc5947f 100644 --- a/app/Config/CURLRequest.php +++ b/app/Config/CURLRequest.php @@ -6,6 +6,22 @@ class CURLRequest extends BaseConfig { + /** + * -------------------------------------------------------------------------- + * CURLRequest Share Connection Options + * -------------------------------------------------------------------------- + * + * Share connection options between requests. + * + * @var list + * + * @see https://www.php.net/manual/en/curl.constants.php#constant.curl-lock-data-connect + */ + public array $shareConnectionOptions = [ + CURL_LOCK_DATA_CONNECT, + CURL_LOCK_DATA_DNS, + ]; + /** * -------------------------------------------------------------------------- * CURLRequest Share Options diff --git a/app/Config/Cache.php b/app/Config/Cache.php index 0a0a95b..5396259 100644 --- a/app/Config/Cache.php +++ b/app/Config/Cache.php @@ -3,6 +3,7 @@ namespace Config; use CodeIgniter\Cache\CacheInterface; +use CodeIgniter\Cache\Handlers\ApcuHandler; use CodeIgniter\Cache\Handlers\DummyHandler; use CodeIgniter\Cache\Handlers\FileHandler; use CodeIgniter\Cache\Handlers\MemcachedHandler; @@ -111,14 +112,24 @@ class Cache extends BaseConfig * Your Redis server can be specified below, if you are using * the Redis or Predis drivers. * - * @var array{host?: string, password?: string|null, port?: int, timeout?: int, database?: int} + * @var array{ + * host?: string, + * password?: string|null, + * port?: int, + * timeout?: int, + * async?: bool, + * persistent?: bool, + * database?: int + * } */ public array $redis = [ - 'host' => '127.0.0.1', - 'password' => null, - 'port' => 6379, - 'timeout' => 0, - 'database' => 0, + 'host' => '127.0.0.1', + 'password' => null, + 'port' => 6379, + 'timeout' => 0, + 'async' => false, // specific to Predis and ignored by the native Redis extension + 'persistent' => false, + 'database' => 0, ]; /** @@ -132,6 +143,7 @@ class Cache extends BaseConfig * @var array> */ public array $validHandlers = [ + 'apcu' => ApcuHandler::class, 'dummy' => DummyHandler::class, 'file' => FileHandler::class, 'memcached' => MemcachedHandler::class, @@ -158,4 +170,28 @@ class Cache extends BaseConfig * @var bool|list */ public $cacheQueryString = false; + + /** + * -------------------------------------------------------------------------- + * Web Page Caching: Cache Status Codes + * -------------------------------------------------------------------------- + * + * HTTP status codes that are allowed to be cached. Only responses with + * these status codes will be cached by the PageCache filter. + * + * Default: [] - Cache all status codes (backward compatible) + * + * Recommended: [200] - Only cache successful responses + * + * You can also use status codes like: + * [200, 404, 410] - Cache successful responses and specific error codes + * [200, 201, 202, 203, 204] - All 2xx successful responses + * + * WARNING: Using [] may cache temporary error pages (404, 500, etc). + * Consider restricting to [200] for production applications to avoid + * caching errors that should be temporary. + * + * @var list + */ + public array $cacheStatusCodes = []; } diff --git a/app/Config/ContentSecurityPolicy.php b/app/Config/ContentSecurityPolicy.php index b414fcb..f64a9af 100644 --- a/app/Config/ContentSecurityPolicy.php +++ b/app/Config/ContentSecurityPolicy.php @@ -30,6 +30,11 @@ class ContentSecurityPolicy extends BaseConfig */ public ?string $reportURI = null; + /** + * Specifies a reporting endpoint to which violation reports ought to be sent. + */ + public ?string $reportTo = null; + /** * Instructs user agents to rewrite URL schemes, changing * HTTP to HTTPS. This directive is for websites with @@ -38,12 +43,12 @@ class ContentSecurityPolicy extends BaseConfig public bool $upgradeInsecureRequests = false; // ------------------------------------------------------------------------- - // Sources allowed - // Note: once you set a policy to 'none', it cannot be further restricted + // CSP DIRECTIVES SETTINGS + // NOTE: once you set a policy to 'none', it cannot be further restricted // ------------------------------------------------------------------------- /** - * Will default to self if not overridden + * Will default to `'self'` if not overridden * * @var list|string|null */ @@ -56,6 +61,21 @@ class ContentSecurityPolicy extends BaseConfig */ public $scriptSrc = 'self'; + /** + * Specifies valid sources for JavaScript