Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): update rector/rector requirement from 0.13.0 to 0.13.2 #6052

Merged
merged 8 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rector.php export-ignore
phpunit.xml.dist export-ignore
phpstan-baseline.neon.dist export-ignore
phpstan.neon.dist export-ignore
phpstan-bootstrap.php export-ignore
.php-cs-fixer.dist.php export-ignore
.php-cs-fixer.no-header.php export-ignore
.php-cs-fixer.user-guide.php export-ignore
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"phpstan/phpstan": "^1.7.1",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1",
"rector/rector": "0.13.0"
"rector/rector": "0.13.2"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
Expand Down
7 changes: 7 additions & 0 deletions phpstan-bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

require __DIR__ . '/system/Test/bootstrap.php';

if (! defined('OCI_COMMIT_ON_SUCCESS')) {
define('OCI_COMMIT_ON_SUCCESS', 32);
}
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parameters:
- utils/PHPStan
treatPhpDocTypesAsCertain: false
bootstrapFiles:
- system/Test/bootstrap.php
- phpstan-bootstrap.php
excludePaths:
- app/Views/errors/cli/*
- app/Views/errors/html/*
Expand Down
4 changes: 0 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector;
use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector;
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
Expand Down Expand Up @@ -80,9 +79,6 @@
JsonThrowOnErrorRector::class,
StringifyStrNeedlesRector::class,

// requires php 8
RemoveUnusedPromotedPropertyRector::class,

RemoveUnusedPrivateMethodRector::class => [
// private method called via getPrivateMethodInvoker
__DIR__ . '/tests/system/Test/ReflectionHelperTest.php',
Expand Down
3 changes: 2 additions & 1 deletion system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use CodeIgniter\Router\Router;
use Config\App;
use Config\Cache;
use Config\Kint as KintConfig;
use Config\Services;
use Exception;
use Kint;
Expand Down Expand Up @@ -258,7 +259,7 @@ protected function initializeKint()
/**
* Config\Kint
*/
$config = config('Config\Kint');
$config = config(KintConfig::class);

Kint::$depth_limit = $config->maxDepth;
Kint::$display_called_from = $config->displayCalledFrom;
Expand Down
4 changes: 3 additions & 1 deletion system/Test/Mock/MockLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace CodeIgniter\Test\Mock;

use Tests\Support\Log\Handlers\TestHandler;

class MockLogger
{
/*
Expand Down Expand Up @@ -81,7 +83,7 @@ class MockLogger
*/
public $handlers = [
// File Handler
'Tests\Support\Log\Handlers\TestHandler' => [
TestHandler::class => [
// The log levels that this handler will handle.
'handles' => [
'critical',
Expand Down
4 changes: 2 additions & 2 deletions system/Test/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

use CodeIgniter\Config\DotEnv;
use CodeIgniter\Router\RouteCollection;
use CodeIgniter\Services;
use Config\Autoload;
use Config\Modules;
use Config\Paths;
use Config\Services;

error_reporting(E_ALL);
ini_set('display_errors', '1');
Expand Down Expand Up @@ -78,7 +78,7 @@

// Use Config\Services as CodeIgniter\Services
if (! class_exists('CodeIgniter\Services', false)) {
class_alias('Config\Services', 'CodeIgniter\Services');
class_alias(Services::class, 'CodeIgniter\Services');
}

// Initialize and register the loader with the SPL autoloader stack.
Expand Down
4 changes: 2 additions & 2 deletions system/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
* files can use the path constants.
*/

if (! class_exists('Config\Autoload', false)) {
if (! class_exists(Autoload::class, false)) {
require_once SYSTEMPATH . 'Config/AutoloadConfig.php';
require_once APPPATH . 'Config/Autoload.php';
require_once SYSTEMPATH . 'Modules/Modules.php';
Expand All @@ -103,7 +103,7 @@

// Use Config\Services as CodeIgniter\Services
if (! class_exists('CodeIgniter\Services', false)) {
class_alias('Config\Services', 'CodeIgniter\Services');
class_alias(Services::class, 'CodeIgniter\Services');
}

// Initialize and register the loader with the SPL autoloader stack.
Expand Down