Skip to content

Commit 69d2d81

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.3
Conflicts: composer.json tests/system/CLI/CLITest.php tests/system/CLI/CommandRunnerTest.php tests/system/CLI/ConsoleTest.php tests/system/Commands/ClearCacheTest.php tests/system/Commands/ClearDebugbarTest.php tests/system/Commands/ClearLogsTest.php tests/system/Commands/CommandGeneratorTest.php tests/system/Commands/CommandTest.php tests/system/Commands/ConfigGeneratorTest.php tests/system/Commands/ConfigurableSortImportsTest.php tests/system/Commands/ControllerGeneratorTest.php tests/system/Commands/CreateDatabaseTest.php tests/system/Commands/Database/MigrateStatusTest.php tests/system/Commands/Database/ShowTableInfoTest.php tests/system/Commands/DatabaseCommandsTest.php tests/system/Commands/EntityGeneratorTest.php tests/system/Commands/EnvironmentCommandTest.php tests/system/Commands/FilterGeneratorTest.php tests/system/Commands/GenerateKeyTest.php tests/system/Commands/GeneratorsTest.php tests/system/Commands/HelpCommandTest.php tests/system/Commands/InfoCacheTest.php tests/system/Commands/MigrationGeneratorTest.php tests/system/Commands/MigrationIntegrationTest.php tests/system/Commands/ModelGeneratorTest.php tests/system/Commands/PublishCommandTest.php tests/system/Commands/RoutesTest.php tests/system/Commands/ScaffoldGeneratorTest.php tests/system/Commands/SeederGeneratorTest.php tests/system/Commands/ValidationGeneratorTest.php tests/system/Debug/Toolbar/Collectors/HistoryTest.php tests/system/Test/TestCaseTest.php
2 parents 2ad6f51 + ab55fe1 commit 69d2d81

33 files changed

Lines changed: 337 additions & 52 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"phpunit/phpcov": "^8.2",
2626
"phpunit/phpunit": "^9.1",
2727
"predis/predis": "^1.1 || ^2.0",
28-
"rector/rector": "0.14.8",
28+
"rector/rector": "0.15.0",
2929
"vimeo/psalm": "^5.0"
3030
},
3131
"suggest": {

rector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
4848
use Rector\Set\ValueObject\LevelSetList;
4949
use Rector\Set\ValueObject\SetList;
50+
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
5051
use Utils\Rector\PassStrictParameterToFunctionParameterRector;
5152
use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector;
5253
use Utils\Rector\RemoveVarTagFromClassConstantRector;
@@ -125,6 +126,9 @@
125126
GetMockBuilderGetMockToCreateMockRector::class => [
126127
__DIR__ . '/tests/system/Email/EmailTest.php',
127128
],
129+
130+
// buggy on union mixed type, new class extends SomeClass marked as object in union, and false replaced with bool in Union
131+
TypedPropertyFromAssignsRector::class,
128132
]);
129133

130134
// auto import fully qualified class names

tests/system/API/ResponseTraitTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@
2929
*/
3030
final class ResponseTraitTest extends CIUnitTestCase
3131
{
32+
/**
33+
* @var MockIncomingRequest|null
34+
*/
3235
private $request;
36+
37+
/**
38+
* @var MockResponse|null
39+
*/
3340
private $response;
41+
3442
private ?FormatterInterface $formatter = null;
3543

3644
protected function setUp(): void

tests/system/Commands/BaseCommandTest.php

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

1212
namespace CodeIgniter\Commands;
1313

14+
use CodeIgniter\Log\Logger;
1415
use CodeIgniter\Test\CIUnitTestCase;
1516
use Config\Services;
1617
use Tests\Support\Commands\AppInfo;
@@ -22,7 +23,7 @@
2223
*/
2324
final class BaseCommandTest extends CIUnitTestCase
2425
{
25-
private $logger;
26+
private Logger $logger;
2627

2728
protected function setUp(): void
2829
{

tests/system/Commands/ClearDebugbarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class ClearDebugbarTest extends CIUnitTestCase
2323
{
2424
use StreamFilterTrait;
2525

26-
private $time;
26+
private int $time;
2727

2828
protected function setUp(): void
2929
{

tests/system/Commands/ClearLogsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class ClearLogsTest extends CIUnitTestCase
2323
{
2424
use StreamFilterTrait;
2525

26-
private $date;
26+
private string $date;
2727

2828
protected function setUp(): void
2929
{

tests/system/Commands/CommandTest.php

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

1212
namespace CodeIgniter\Commands;
1313

14+
use CodeIgniter\CLI\Commands;
15+
use CodeIgniter\Log\Logger;
1416
use CodeIgniter\Test\CIUnitTestCase;
1517
use CodeIgniter\Test\StreamFilterTrait;
1618
use Config\Services;
@@ -25,8 +27,8 @@ final class CommandTest extends CIUnitTestCase
2527
{
2628
use StreamFilterTrait;
2729

28-
private $logger;
29-
private $commands;
30+
private Logger $logger;
31+
private Commands $commands;
3032

3133
protected function setUp(): void
3234
{

tests/system/Config/BaseConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
final class BaseConfigTest extends CIUnitTestCase
2828
{
29-
private $fixturesFolder;
29+
private string $fixturesFolder;
3030

3131
protected function setUp(): void
3232
{

tests/system/Config/DotEnvTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class DotEnvTest extends CIUnitTestCase
2626
{
2727
private ?vfsStreamDirectory $root;
2828
private string $path;
29-
private $fixturesFolder;
29+
private string $fixturesFolder;
3030

3131
protected function setUp(): void
3232
{

tests/system/Config/ServicesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
*/
5454
final class ServicesTest extends CIUnitTestCase
5555
{
56-
private $config;
57-
private $original;
56+
private App $config;
57+
private array $original;
5858

5959
protected function setUp(): void
6060
{

0 commit comments

Comments
 (0)