mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Update rector/rector requirement from 0.11.48 to 0.11.49 (#5018)
This commit is contained in:
parent
9b4fbce55e
commit
d8b43eb25f
@ -23,7 +23,7 @@
|
||||
"phpstan/phpstan": "^0.12.91",
|
||||
"phpunit/phpunit": "^9.1",
|
||||
"predis/predis": "^1.1",
|
||||
"rector/rector": "0.11.48",
|
||||
"rector/rector": "0.11.49",
|
||||
"symplify/package-builder": "^9.3"
|
||||
},
|
||||
"suggest": {
|
||||
|
22
rector.php
22
rector.php
@ -30,11 +30,9 @@ use Rector\Core\ValueObject\PhpVersion;
|
||||
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector;
|
||||
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
|
||||
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
|
||||
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
|
||||
use Rector\DeadCode\Rector\Expression\RemoveDeadStmtRector;
|
||||
use Rector\DeadCode\Rector\If_\RemoveUnusedNonEmptyArrayBeforeForeachRector;
|
||||
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector;
|
||||
use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector;
|
||||
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector;
|
||||
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
|
||||
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
|
||||
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
|
||||
@ -78,9 +76,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
// requires php 8
|
||||
RemoveUnusedPromotedPropertyRector::class,
|
||||
|
||||
// currently buggy on call inside assign, wait for next release
|
||||
RemoveParentCallWithoutParentRector::class,
|
||||
|
||||
// private method called via getPrivateMethodInvoker
|
||||
RemoveUnusedPrivateMethodRector::class => [
|
||||
__DIR__ . '/system/Entity/Entity.php',
|
||||
@ -92,21 +87,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
__DIR__ . '/tests',
|
||||
],
|
||||
|
||||
// currently buggy on class implements ArrayAccess, wait for next release
|
||||
RemoveDeadStmtRector::class => [
|
||||
__DIR__ . '/tests/system/Cookie/CookieTest.php',
|
||||
],
|
||||
|
||||
// check on constant compare
|
||||
UnwrapFutureCompatibleIfPhpVersionRector::class => [
|
||||
__DIR__ . '/system/CodeIgniter.php',
|
||||
],
|
||||
|
||||
// check context ResponseTrait
|
||||
RemoveUselessReturnTagRector::class => [
|
||||
__DIR__ . '/system/HTTP/MessageTrait.php',
|
||||
],
|
||||
|
||||
// casted to Entity via EntityTest->getCastEntity()
|
||||
RecastingRemovalRector::class => [
|
||||
__DIR__ . '/tests/system/Entity/EntityTest.php',
|
||||
@ -116,6 +101,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
UnderscoreToCamelCaseVariableNameRector::class => [
|
||||
__DIR__ . '/system/Session/Handlers',
|
||||
],
|
||||
|
||||
// check on $_SESSION
|
||||
RemoveUnusedNonEmptyArrayBeforeForeachRector::class => [
|
||||
__DIR__ . '/system/Debug/Toolbar.php',
|
||||
],
|
||||
]);
|
||||
|
||||
// auto import fully qualified class names
|
||||
|
@ -471,9 +471,9 @@ if (! function_exists('force_https')) {
|
||||
$baseURL = config(App::class)->baseURL;
|
||||
|
||||
if (strpos($baseURL, 'https://') === 0) {
|
||||
$baseURL = (string) substr($baseURL, strlen('https://'));
|
||||
$baseURL = substr($baseURL, strlen('https://'));
|
||||
} elseif (strpos($baseURL, 'http://') === 0) {
|
||||
$baseURL = (string) substr($baseURL, strlen('http://'));
|
||||
$baseURL = substr($baseURL, strlen('http://'));
|
||||
}
|
||||
|
||||
$uri = URI::createURIString(
|
||||
@ -601,18 +601,16 @@ if (! function_exists('helper')) {
|
||||
else {
|
||||
$paths = $loader->search('Helpers/' . $filename);
|
||||
|
||||
if (! empty($paths)) {
|
||||
foreach ($paths as $path) {
|
||||
if (strpos($path, APPPATH) === 0) {
|
||||
// @codeCoverageIgnoreStart
|
||||
$appHelper = $path;
|
||||
// @codeCoverageIgnoreEnd
|
||||
} elseif (strpos($path, SYSTEMPATH) === 0) {
|
||||
$systemHelper = $path;
|
||||
} else {
|
||||
$localIncludes[] = $path;
|
||||
$loaded[] = $filename;
|
||||
}
|
||||
foreach ($paths as $path) {
|
||||
if (strpos($path, APPPATH) === 0) {
|
||||
// @codeCoverageIgnoreStart
|
||||
$appHelper = $path;
|
||||
// @codeCoverageIgnoreEnd
|
||||
} elseif (strpos($path, SYSTEMPATH) === 0) {
|
||||
$systemHelper = $path;
|
||||
} else {
|
||||
$localIncludes[] = $path;
|
||||
$loaded[] = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
@ -636,10 +634,8 @@ if (! function_exists('helper')) {
|
||||
}
|
||||
|
||||
// Now actually include all of the files
|
||||
if (! empty($includes)) {
|
||||
foreach ($includes as $path) {
|
||||
include_once $path;
|
||||
}
|
||||
foreach ($includes as $path) {
|
||||
include_once $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -225,12 +225,10 @@ trait DatabaseTestTrait
|
||||
*/
|
||||
protected function clearInsertCache()
|
||||
{
|
||||
if (! empty($this->insertCache)) {
|
||||
foreach ($this->insertCache as $row) {
|
||||
$this->db->table($row[0])
|
||||
->where($row[1])
|
||||
->delete();
|
||||
}
|
||||
foreach ($this->insertCache as $row) {
|
||||
$this->db->table($row[0])
|
||||
->where($row[1])
|
||||
->delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -326,10 +326,8 @@ class FeatureTestCase extends CIUnitTestCase
|
||||
*/
|
||||
protected function setupHeaders(IncomingRequest $request)
|
||||
{
|
||||
if (! empty($this->headers)) {
|
||||
foreach ($this->headers as $name => $value) {
|
||||
$request->setHeader($name, $value);
|
||||
}
|
||||
foreach ($this->headers as $name => $value) {
|
||||
$request->setHeader($name, $value);
|
||||
}
|
||||
|
||||
return $request;
|
||||
|
Loading…
x
Reference in New Issue
Block a user