diff --git a/.github/workflows/deptrac.yml b/.github/workflows/deptrac.yml index ebaf4df..5a3ba06 100644 --- a/.github/workflows/deptrac.yml +++ b/.github/workflows/deptrac.yml @@ -20,4 +20,4 @@ on: jobs: deptrac: - uses: codeigniter4/.github/.github/workflows/deptrac.yml@main + uses: codeigniter4/.github/.github/workflows/deptrac.yml@CI47 diff --git a/.github/workflows/phpcpd.yml b/.github/workflows/phpcpd.yml index 296afa8..1e234d2 100644 --- a/.github/workflows/phpcpd.yml +++ b/.github/workflows/phpcpd.yml @@ -16,6 +16,6 @@ on: jobs: phpcpd: - uses: codeigniter4/.github/.github/workflows/phpcpd.yml@main + uses: codeigniter4/.github/.github/workflows/phpcpd.yml@CI47 with: dirs: "app/ tests/" diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index 38a3c93..b3cb79f 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.1'] + php-versions: ['8.2'] steps: - name: Checkout diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index ddf6070..b0a7632 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.1'] + php-versions: ['8.2'] steps: - name: Checkout diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index f0667bf..66e57cf 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -25,7 +25,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]')" strategy: matrix: - php-versions: ['8.1'] + php-versions: ['8.2'] steps: - name: Checkout @@ -66,7 +66,7 @@ jobs: TACHYCARDIA_MONITOR_GA: enabled GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - if: matrix.php-versions == '8.1' + - if: matrix.php-versions == '8.2' name: Run Coveralls continue-on-error: true run: | diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 53c76e7..8c9d14e 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -20,4 +20,4 @@ on: jobs: psalm: - uses: codeigniter4/.github/.github/workflows/psalm.yml@main + uses: codeigniter4/.github/.github/workflows/psalm.yml@CI47 diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 93c8db2..0c7b8c9 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.1'] + php-versions: ['8.2'] steps: - name: Checkout 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