File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,11 +148,9 @@ class App extends BaseConfig
148148 * - `CodeIgniter\Session\Handlers\MemcachedHandler`
149149 * - `CodeIgniter\Session\Handlers\RedisHandler`
150150 *
151- * @var string
152- *
153151 * @deprecated use Config\Session::$driver instead.
154152 */
155- public $ sessionDriver = FileHandler::class;
153+ public string $ sessionDriver = FileHandler::class;
156154
157155 /**
158156 * --------------------------------------------------------------------------
@@ -345,7 +343,7 @@ class App extends BaseConfig
345343 *
346344 * @var array<string, string>
347345 */
348- public $ proxyIPs = [];
346+ public array $ proxyIPs = [];
349347
350348 /**
351349 * --------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class MockAppConfig extends App
2323 public bool $ cookieSecure = false ;
2424 public bool $ cookieHTTPOnly = false ;
2525 public ?string $ cookieSameSite = 'Lax ' ;
26- public $ proxyIPs = [];
26+ public array $ proxyIPs = [];
2727 public string $ CSRFTokenName = 'csrf_test_name ' ;
2828 public string $ CSRFHeaderName = 'X-CSRF-TOKEN ' ;
2929 public string $ CSRFCookieName = 'csrf_cookie_name ' ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class MockCLIConfig extends App
2323 public bool $ cookieSecure = false ;
2424 public bool $ cookieHTTPOnly = false ;
2525 public ?string $ cookieSameSite = 'Lax ' ;
26- public $ proxyIPs = [];
26+ public array $ proxyIPs = [];
2727 public string $ CSRFTokenName = 'csrf_test_name ' ;
2828 public string $ CSRFCookieName = 'csrf_cookie_name ' ;
2929 public int $ CSRFExpire = 7200 ;
Original file line number Diff line number Diff line change 1616use CodeIgniter \HTTP \Files \UploadedFile ;
1717use CodeIgniter \Test \CIUnitTestCase ;
1818use Config \App ;
19+ use TypeError ;
1920
2021/**
2122 * @backupGlobals enabled
@@ -1072,10 +1073,7 @@ public function testGetIPAddressThruProxyBothIPv4AndIPv6()
10721073
10731074 public function testGetIPAddressThruProxyInvalidConfigString ()
10741075 {
1075- $ this ->expectException (ConfigException::class);
1076- $ this ->expectExceptionMessage (
1077- 'You must set an array with Proxy IP address key and HTTP header name value in Config\App::$proxyIPs. '
1078- );
1076+ $ this ->expectException (TypeError::class);
10791077
10801078 $ config = new App ();
10811079 $ config ->proxyIPs = '192.168.5.0/28 ' ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class App extends BaseConfig
88{
99 // ...
1010
11- public $ indexPage = 'index.php ' ;
11+ public string $ indexPage = 'index.php ' ;
1212
1313 // ...
1414}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class App extends BaseConfig
88{
99 // ...
1010
11- public $ indexPage = 'index.php? ' ;
11+ public string $ indexPage = 'index.php? ' ;
1212
1313 // ...
1414}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class App extends BaseConfig
88{
99 // ...
1010
11- public $ defaultLocale = 'en ' ;
11+ public string $ defaultLocale = 'en ' ;
1212
1313 // ...
1414}
Original file line number Diff line number Diff line change 66
77class App extends BaseConfig
88{
9- public $ defaultLocale = 'en ' ;
9+ public string $ defaultLocale = 'en ' ;
1010
1111 // ...
1212}
Original file line number Diff line number Diff line change 66
77class App extends BaseConfig
88{
9- public $ negotiateLocale = true ;
9+ public bool $ negotiateLocale = true ;
1010
1111 // ...
1212}
Original file line number Diff line number Diff line change 66
77class App extends BaseConfig
88{
9- public $ supportedLocales = ['en ' , 'es ' , 'fr-FR ' ];
9+ public array $ supportedLocales = ['en ' , 'es ' , 'fr-FR ' ];
1010
1111 // ...
1212}
You can’t perform that action at this time.
0 commit comments