Skip to content

Commit 0c66d6b

Browse files
authored
Merge pull request #6052 from codeigniter4/dependabot/composer/rector/rector-0.13.2
chore(deps-dev): update rector/rector requirement from 0.13.0 to 0.13.2
2 parents 4cf4f0f + 724828d commit 0c66d6b

File tree

9 files changed

+19
-12
lines changed

9 files changed

+19
-12
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ rector.php export-ignore
2828
phpunit.xml.dist export-ignore
2929
phpstan-baseline.neon.dist export-ignore
3030
phpstan.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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
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"

phpstan-bootstrap.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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+
}

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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/*

rector.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
2929
use Rector\Config\RectorConfig;
3030
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
31-
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
3231
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector;
3332
use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector;
3433
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
@@ -80,9 +79,6 @@
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',

system/CodeIgniter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
use CodeIgniter\Router\Router;
3030
use Config\App;
3131
use Config\Cache;
32+
use Config\Kint as KintConfig;
3233
use Config\Services;
3334
use Exception;
3435
use 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;

system/Test/Mock/MockLogger.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace CodeIgniter\Test\Mock;
1313

14+
use Tests\Support\Log\Handlers\TestHandler;
15+
1416
class 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',

system/Test/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
use CodeIgniter\Config\DotEnv;
1313
use CodeIgniter\Router\RouteCollection;
14-
use CodeIgniter\Services;
1514
use Config\Autoload;
1615
use Config\Modules;
1716
use Config\Paths;
17+
use Config\Services;
1818

1919
error_reporting(E_ALL);
2020
ini_set('display_errors', '1');
@@ -78,7 +78,7 @@
7878

7979
// Use Config\Services as CodeIgniter\Services
8080
if (! 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.

system/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
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';
@@ -103,7 +103,7 @@
103103

104104
// Use Config\Services as CodeIgniter\Services
105105
if (! 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.

0 commit comments

Comments
 (0)