File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ rector.php export-ignore
2828phpunit.xml.dist export-ignore
2929phpstan-baseline.neon.dist export-ignore
3030phpstan.neon.dist export-ignore
31+ phpstan-bootstrap.php export-ignore
3132.php-cs-fixer.dist.php export-ignore
3233.php-cs-fixer.no-header.php export-ignore
3334.php-cs-fixer.user-guide.php export-ignore
Original file line number Diff line number Diff line change 2424 "phpstan/phpstan" : " ^1.7.1" ,
2525 "phpunit/phpunit" : " ^9.1" ,
2626 "predis/predis" : " ^1.1" ,
27- "rector/rector" : " 0.13.0 "
27+ "rector/rector" : " 0.13.2 "
2828 },
2929 "suggest" : {
3030 "ext-fileinfo" : " Improves mime type detection for files"
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ require __DIR__ . '/system/Test/bootstrap.php ' ;
4+
5+ if (! defined ('OCI_COMMIT_ON_SUCCESS ' )) {
6+ define ('OCI_COMMIT_ON_SUCCESS ' , 32 );
7+ }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ parameters:
2525 - utils/PHPStan
2626 treatPhpDocTypesAsCertain: false
2727 bootstrapFiles:
28- - system/Test/ bootstrap.php
28+ - phpstan- bootstrap.php
2929 excludePaths:
3030 - app/Views/errors/cli/*
3131 - app/Views/errors/html/*
Original file line number Diff line number Diff line change 2828use Rector \CodingStyle \Rector \FuncCall \CountArrayToEmptyArrayComparisonRector ;
2929use Rector \Config \RectorConfig ;
3030use Rector \DeadCode \Rector \ClassMethod \RemoveUnusedPrivateMethodRector ;
31- use Rector \DeadCode \Rector \ClassMethod \RemoveUnusedPromotedPropertyRector ;
3231use Rector \DeadCode \Rector \If_ \UnwrapFutureCompatibleIfPhpVersionRector ;
3332use Rector \DeadCode \Rector \MethodCall \RemoveEmptyMethodCallRector ;
3433use Rector \EarlyReturn \Rector \Foreach_ \ChangeNestedForeachIfsToEarlyContinueRector ;
8079 JsonThrowOnErrorRector::class,
8180 StringifyStrNeedlesRector::class,
8281
83- // requires php 8
84- RemoveUnusedPromotedPropertyRector::class,
85-
8682 RemoveUnusedPrivateMethodRector::class => [
8783 // private method called via getPrivateMethodInvoker
8884 __DIR__ . '/tests/system/Test/ReflectionHelperTest.php ' ,
Original file line number Diff line number Diff line change 2929use CodeIgniter \Router \Router ;
3030use Config \App ;
3131use Config \Cache ;
32+ use Config \Kint as KintConfig ;
3233use Config \Services ;
3334use Exception ;
3435use Kint ;
@@ -258,7 +259,7 @@ protected function initializeKint()
258259 /**
259260 * Config\Kint
260261 */
261- $ config = config (' Config\Kint ' );
262+ $ config = config (KintConfig::class );
262263
263264 Kint::$ depth_limit = $ config ->maxDepth ;
264265 Kint::$ display_called_from = $ config ->displayCalledFrom ;
Original file line number Diff line number Diff line change 1111
1212namespace CodeIgniter \Test \Mock ;
1313
14+ use Tests \Support \Log \Handlers \TestHandler ;
15+
1416class MockLogger
1517{
1618 /*
@@ -81,7 +83,7 @@ class MockLogger
8183 */
8284 public $ handlers = [
8385 // File Handler
84- ' Tests\Support\Log\Handlers\ TestHandler' => [
86+ TestHandler::class => [
8587 // The log levels that this handler will handle.
8688 'handles ' => [
8789 'critical ' ,
Original file line number Diff line number Diff line change 1111
1212use CodeIgniter \Config \DotEnv ;
1313use CodeIgniter \Router \RouteCollection ;
14- use CodeIgniter \Services ;
1514use Config \Autoload ;
1615use Config \Modules ;
1716use Config \Paths ;
17+ use Config \Services ;
1818
1919error_reporting (E_ALL );
2020ini_set ('display_errors ' , '1 ' );
7878
7979// Use Config\Services as CodeIgniter\Services
8080if (! class_exists ('CodeIgniter\Services ' , false )) {
81- class_alias (' Config\ Services' , 'CodeIgniter\Services ' );
81+ class_alias (Services::class , 'CodeIgniter\Services ' );
8282}
8383
8484// Initialize and register the loader with the SPL autoloader stack.
Original file line number Diff line number Diff line change 8989 * files can use the path constants.
9090 */
9191
92- if (! class_exists (' Config\ Autoload' , false )) {
92+ if (! class_exists (Autoload::class , false )) {
9393 require_once SYSTEMPATH . 'Config/AutoloadConfig.php ' ;
9494 require_once APPPATH . 'Config/Autoload.php ' ;
9595 require_once SYSTEMPATH . 'Modules/Modules.php ' ;
103103
104104// Use Config\Services as CodeIgniter\Services
105105if (! class_exists ('CodeIgniter\Services ' , false )) {
106- class_alias (' Config\ Services' , 'CodeIgniter\Services ' );
106+ class_alias (Services::class , 'CodeIgniter\Services ' );
107107}
108108
109109// Initialize and register the loader with the SPL autoloader stack.
You can’t perform that action at this time.
0 commit comments