File tree Expand file tree Collapse file tree 9 files changed +19
-12
lines changed Expand file tree Collapse file tree 9 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ rector.php export-ignore
28
28
phpunit.xml.dist export-ignore
29
29
phpstan-baseline.neon.dist export-ignore
30
30
phpstan.neon.dist export-ignore
31
+ phpstan-bootstrap.php export-ignore
31
32
.php-cs-fixer.dist.php export-ignore
32
33
.php-cs-fixer.no-header.php export-ignore
33
34
.php-cs-fixer.user-guide.php export-ignore
Original file line number Diff line number Diff line change 24
24
"phpstan/phpstan" : " ^1.7.1" ,
25
25
"phpunit/phpunit" : " ^9.1" ,
26
26
"predis/predis" : " ^1.1" ,
27
- "rector/rector" : " 0.13.0 "
27
+ "rector/rector" : " 0.13.2 "
28
28
},
29
29
"suggest" : {
30
30
"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:
25
25
- utils/PHPStan
26
26
treatPhpDocTypesAsCertain: false
27
27
bootstrapFiles:
28
- - system/Test/ bootstrap.php
28
+ - phpstan- bootstrap.php
29
29
excludePaths:
30
30
- app/Views/errors/cli/*
31
31
- app/Views/errors/html/*
Original file line number Diff line number Diff line change 28
28
use Rector \CodingStyle \Rector \FuncCall \CountArrayToEmptyArrayComparisonRector ;
29
29
use Rector \Config \RectorConfig ;
30
30
use Rector \DeadCode \Rector \ClassMethod \RemoveUnusedPrivateMethodRector ;
31
- use Rector \DeadCode \Rector \ClassMethod \RemoveUnusedPromotedPropertyRector ;
32
31
use Rector \DeadCode \Rector \If_ \UnwrapFutureCompatibleIfPhpVersionRector ;
33
32
use Rector \DeadCode \Rector \MethodCall \RemoveEmptyMethodCallRector ;
34
33
use Rector \EarlyReturn \Rector \Foreach_ \ChangeNestedForeachIfsToEarlyContinueRector ;
80
79
JsonThrowOnErrorRector::class,
81
80
StringifyStrNeedlesRector::class,
82
81
83
- // requires php 8
84
- RemoveUnusedPromotedPropertyRector::class,
85
-
86
82
RemoveUnusedPrivateMethodRector::class => [
87
83
// private method called via getPrivateMethodInvoker
88
84
__DIR__ . '/tests/system/Test/ReflectionHelperTest.php ' ,
Original file line number Diff line number Diff line change 29
29
use CodeIgniter \Router \Router ;
30
30
use Config \App ;
31
31
use Config \Cache ;
32
+ use Config \Kint as KintConfig ;
32
33
use Config \Services ;
33
34
use Exception ;
34
35
use Kint ;
@@ -258,7 +259,7 @@ protected function initializeKint()
258
259
/**
259
260
* Config\Kint
260
261
*/
261
- $ config = config (' Config\Kint ' );
262
+ $ config = config (KintConfig::class );
262
263
263
264
Kint::$ depth_limit = $ config ->maxDepth ;
264
265
Kint::$ display_called_from = $ config ->displayCalledFrom ;
Original file line number Diff line number Diff line change 11
11
12
12
namespace CodeIgniter \Test \Mock ;
13
13
14
+ use Tests \Support \Log \Handlers \TestHandler ;
15
+
14
16
class MockLogger
15
17
{
16
18
/*
@@ -81,7 +83,7 @@ class MockLogger
81
83
*/
82
84
public $ handlers = [
83
85
// File Handler
84
- ' Tests\Support\Log\Handlers\ TestHandler' => [
86
+ TestHandler::class => [
85
87
// The log levels that this handler will handle.
86
88
'handles ' => [
87
89
'critical ' ,
Original file line number Diff line number Diff line change 11
11
12
12
use CodeIgniter \Config \DotEnv ;
13
13
use CodeIgniter \Router \RouteCollection ;
14
- use CodeIgniter \Services ;
15
14
use Config \Autoload ;
16
15
use Config \Modules ;
17
16
use Config \Paths ;
17
+ use Config \Services ;
18
18
19
19
error_reporting (E_ALL );
20
20
ini_set ('display_errors ' , '1 ' );
78
78
79
79
// Use Config\Services as CodeIgniter\Services
80
80
if (! class_exists ('CodeIgniter\Services ' , false )) {
81
- class_alias (' Config\ Services' , 'CodeIgniter\Services ' );
81
+ class_alias (Services::class , 'CodeIgniter\Services ' );
82
82
}
83
83
84
84
// Initialize and register the loader with the SPL autoloader stack.
Original file line number Diff line number Diff line change 89
89
* files can use the path constants.
90
90
*/
91
91
92
- if (! class_exists (' Config\ Autoload' , false )) {
92
+ if (! class_exists (Autoload::class , false )) {
93
93
require_once SYSTEMPATH . 'Config/AutoloadConfig.php ' ;
94
94
require_once APPPATH . 'Config/Autoload.php ' ;
95
95
require_once SYSTEMPATH . 'Modules/Modules.php ' ;
103
103
104
104
// Use Config\Services as CodeIgniter\Services
105
105
if (! class_exists ('CodeIgniter\Services ' , false )) {
106
- class_alias (' Config\ Services' , 'CodeIgniter\Services ' );
106
+ class_alias (Services::class , 'CodeIgniter\Services ' );
107
107
}
108
108
109
109
// Initialize and register the loader with the SPL autoloader stack.
You can’t perform that action at this time.
0 commit comments