Skip to content

Commit 4837aec

Browse files
authored
Merge pull request #476 from codeigniter4projects/develop
Deploy
2 parents d1b6c11 + 37dd49c commit 4837aec

File tree

24 files changed

+1504
-710
lines changed

24 files changed

+1504
-710
lines changed

.github/workflows/infection.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up PHP
3232
uses: shivammathur/setup-php@v2
3333
with:
34-
php-version: '8.1'
34+
php-version: '8.2'
3535
tools: infection, phpunit
3636
extensions: intl, json, mbstring, gd, xml, sqlite3
3737
coverage: xdebug

app/Config/Boot/development.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
|--------------------------------------------------------------------------
45
| ERROR DISPLAY

app/Config/Cache.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,6 @@ class Cache extends BaseConfig
3434
*/
3535
public string $backupHandler = 'dummy';
3636

37-
/**
38-
* --------------------------------------------------------------------------
39-
* Cache Directory Path
40-
* --------------------------------------------------------------------------
41-
*
42-
* The path to where cache files should be stored, if using a file-based
43-
* system.
44-
*
45-
* @deprecated Use the driver-specific variant under $file
46-
*/
47-
public string $storePath = WRITEPATH . 'cache/';
48-
4937
/**
5038
* --------------------------------------------------------------------------
5139
* Key Prefix
@@ -85,6 +73,7 @@ class Cache extends BaseConfig
8573
* --------------------------------------------------------------------------
8674
* File settings
8775
* --------------------------------------------------------------------------
76+
*
8877
* Your file storage preferences can be specified below, if you are using
8978
* the File driver.
9079
*
@@ -99,6 +88,7 @@ class Cache extends BaseConfig
9988
* -------------------------------------------------------------------------
10089
* Memcached settings
10190
* -------------------------------------------------------------------------
91+
*
10292
* Your Memcached servers can be specified below, if you are using
10393
* the Memcached drivers.
10494
*

app/Config/Constants.php

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,28 +67,13 @@
6767
| https://tldp.org/LDP/abs/html/exitcodes.html
6868
|
6969
*/
70-
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
71-
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
72-
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
73-
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
74-
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
70+
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
71+
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
72+
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
73+
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
74+
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
7575
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
76-
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
77-
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
78-
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
79-
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
80-
81-
/**
82-
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_LOW instead.
83-
*/
84-
define('EVENT_PRIORITY_LOW', 200);
85-
86-
/**
87-
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_NORMAL instead.
88-
*/
89-
define('EVENT_PRIORITY_NORMAL', 100);
90-
91-
/**
92-
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead.
93-
*/
94-
define('EVENT_PRIORITY_HIGH', 10);
76+
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
77+
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
78+
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
79+
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code

app/Config/Database.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class Database extends Config
4343
'failover' => [],
4444
'port' => 3306,
4545
'numberNative' => false,
46+
'foundRows' => false,
4647
'dateFormat' => [
4748
'date' => 'Y-m-d',
4849
'datetime' => 'Y-m-d H:i:s',
@@ -64,6 +65,7 @@ class Database extends Config
6465
// 'failover' => [],
6566
// 'foreignKeys' => true,
6667
// 'busyTimeout' => 1000,
68+
// 'synchronous' => null,
6769
// 'dateFormat' => [
6870
// 'date' => 'Y-m-d',
6971
// 'datetime' => 'Y-m-d H:i:s',

app/Config/Events.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
*/
4545
if (CI_DEBUG && ! is_cli()) {
4646
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
47-
Services::toolbar()->respond();
47+
service('toolbar')->respond();
4848
// Hot Reload route - for framework use on the hot reloader.
4949
if (ENVIRONMENT === 'development') {
50-
Services::routes()->get('__hot-reload', static function () {
50+
service('routes')->get('__hot-reload', static function (): void {
5151
(new HotReloader())->run();
5252
});
5353
}

app/Config/Exceptions.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ class Exceptions extends BaseConfig
6060

6161
/**
6262
* --------------------------------------------------------------------------
63-
* LOG DEPRECATIONS INSTEAD OF THROWING?
63+
* WHETHER TO THROW AN EXCEPTION ON DEPRECATED ERRORS
6464
* --------------------------------------------------------------------------
65-
* By default, CodeIgniter converts deprecations into exceptions. Also,
66-
* starting in PHP 8.1 will cause a lot of deprecated usage warnings.
67-
* Use this option to temporarily cease the warnings and instead log those.
68-
* This option also works for user deprecations.
65+
* If set to `true`, DEPRECATED errors are only logged and no exceptions are
66+
* thrown. This option also works for user deprecations.
6967
*/
7068
public bool $logDeprecations = true;
7169

app/Config/Feature.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
class Feature extends BaseConfig
1111
{
1212
/**
13-
* Use improved new auto routing instead of the default legacy version.
13+
* Use improved new auto routing instead of the legacy version.
1414
*/
15-
public bool $autoRoutesImproved = false;
15+
public bool $autoRoutesImproved = true;
1616

1717
/**
1818
* Use filter execution order in 4.4 or before.
@@ -26,4 +26,12 @@ class Feature extends BaseConfig
2626
* If false, `limit(0)` returns no records. (the behavior of 3.1.9 or later in version 3.x.)
2727
*/
2828
public bool $limitZeroAsAll = true;
29+
30+
/**
31+
* Use strict location negotiation.
32+
*
33+
* By default, the locale is selected based on a loose comparison of the language code (ISO 639-1)
34+
* Enabling strict comparison will also consider the region code (ISO 3166-1 alpha-2).
35+
*/
36+
public bool $strictLocaleNegotiation = false;
2937
}

app/Config/Format.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Config;
44

55
use CodeIgniter\Config\BaseConfig;
6-
use CodeIgniter\Format\FormatterInterface;
76
use CodeIgniter\Format\JSONFormatter;
87
use CodeIgniter\Format\XMLFormatter;
98

@@ -62,16 +61,4 @@ class Format extends BaseConfig
6261
'application/xml' => 0,
6362
'text/xml' => 0,
6463
];
65-
66-
/**
67-
* A Factory method to return the appropriate formatter for the given mime type.
68-
*
69-
* @return FormatterInterface
70-
*
71-
* @deprecated This is an alias of `\CodeIgniter\Format\Format::getFormatter`. Use that instead.
72-
*/
73-
public function getFormatter(string $mime)
74-
{
75-
return Services::format()->getFormatter($mime);
76-
}
7764
}

app/Config/Kint.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Config;
44

55
use Kint\Parser\ConstructablePluginInterface;
6-
use Kint\Renderer\AbstractRenderer;
76
use Kint\Renderer\Rich\TabPluginInterface;
87
use Kint\Renderer\Rich\ValuePluginInterface;
98

@@ -41,7 +40,6 @@ class Kint
4140
*/
4241
public string $richTheme = 'aante-light.css';
4342
public bool $richFolder = false;
44-
public int $richSort = AbstractRenderer::SORT_FULL;
4543

4644
/**
4745
* @var array<string, class-string<ValuePluginInterface>>|null

0 commit comments

Comments
 (0)