Skip to content

Commit 9215c8c

Browse files
authored
Merge pull request #9930 from codeigniter4/dependabot/composer/rector/rector-2.3.6
chore(deps-dev): update rector/rector requirement from 2.3.5 to 2.3.6
2 parents dbaf84f + 31be266 commit 9215c8c

File tree

6 files changed

+25
-17
lines changed

6 files changed

+25
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"phpunit/phpcov": "^9.0.2 || ^10.0",
2929
"phpunit/phpunit": "^10.5.16 || ^11.2",
3030
"predis/predis": "^3.0",
31-
"rector/rector": "2.3.5",
31+
"rector/rector": "2.3.6",
3232
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
3333
},
3434
"replace": {

rector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
3232
use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
3333
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
34+
use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector;
3435
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
3536
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
3637
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
@@ -194,6 +195,10 @@
194195
__DIR__ . '/tests/system/Database',
195196
__DIR__ . '/tests/system/Models',
196197
],
198+
199+
StaticCallOnNonStaticToInstanceCallRector::class => [
200+
__DIR__ . '/tests/_support/Config/Services.php',
201+
],
197202
])
198203
// auto import fully qualified class names
199204
->withImportNames(removeUnusedImports: true)

tests/system/API/ResponseTraitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ public function testPaginateWithModel(): void
753753
public function testPaginateWithQueryBuilder(): void
754754
{
755755
// Mock the database and builder
756-
$db = $this->createMock(BaseConnection::class);
756+
$db = $this->createStub(BaseConnection::class);
757757

758758
$builder = $this->getMockBuilder(BaseBuilder::class)
759759
->setConstructorArgs(['test_table', $db])
@@ -1100,7 +1100,7 @@ public function testPaginateWithTransformerAndQueryBuilder(): void
11001100
];
11011101

11021102
// Mock the database and builder
1103-
$db = $this->createMock(BaseConnection::class);
1103+
$db = $this->createStub(BaseConnection::class);
11041104

11051105
$builder = $this->getMockBuilder(BaseBuilder::class)
11061106
->setConstructorArgs(['test_table', $db])

tests/system/Models/SaveModelTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Tests\Support\Models\EntityModel;
2323
use Tests\Support\Models\JobModel;
2424
use Tests\Support\Models\SecondaryModel;
25+
use Tests\Support\Models\SimpleEntity;
2526
use Tests\Support\Models\UserModel;
2627
use Tests\Support\Models\ValidModel;
2728
use Tests\Support\Models\WithoutAutoIncrementModel;
@@ -173,6 +174,7 @@ public function testSelectAndEntitiesSaveOnlyChangedValues(): void
173174
$this->assertSame('Rocket Scientist', $job->name);
174175

175176
$job->description = 'Some guitar description';
177+
$this->assertInstanceOf(SimpleEntity::class, $job);
176178
$this->model->save($job);
177179
$this->seeInDatabase('job', [
178180
'id' => $job->id,

tests/system/Models/UpdateModelTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ public function testUpdateEntityUpdateOnlyChangedFalse(): void
696696

697697
$user = $model->find(1);
698698
$updateAtBefore = $user->updated_at;
699+
$this->assertInstanceOf(User::class, $user);
699700

700701
// updates the Entity without changes.
701702
$result = $model->update(1, $user);

utils/phpstan-baseline/missingType.property.neon

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -318,72 +318,72 @@ parameters:
318318
path: ../../tests/system/Models/InsertModelTest.php
319319

320320
-
321-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$_options has no type specified\.$#'
321+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$_options has no type specified\.$#'
322322
count: 1
323323
path: ../../tests/system/Models/SaveModelTest.php
324324

325325
-
326-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$country has no type specified\.$#'
326+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$country has no type specified\.$#'
327327
count: 1
328328
path: ../../tests/system/Models/SaveModelTest.php
329329

330330
-
331-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$created_at has no type specified\.$#'
331+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$created_at has no type specified\.$#'
332332
count: 1
333333
path: ../../tests/system/Models/SaveModelTest.php
334334

335335
-
336-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$deleted has no type specified\.$#'
336+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$deleted has no type specified\.$#'
337337
count: 1
338338
path: ../../tests/system/Models/SaveModelTest.php
339339

340340
-
341-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$email has no type specified\.$#'
341+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$email has no type specified\.$#'
342342
count: 1
343343
path: ../../tests/system/Models/SaveModelTest.php
344344

345345
-
346-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$id has no type specified\.$#'
346+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$id has no type specified\.$#'
347347
count: 1
348348
path: ../../tests/system/Models/SaveModelTest.php
349349

350350
-
351-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$name has no type specified\.$#'
351+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$name has no type specified\.$#'
352352
count: 1
353353
path: ../../tests/system/Models/SaveModelTest.php
354354

355355
-
356-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:239\:\:\$updated_at has no type specified\.$#'
356+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:241\:\:\$updated_at has no type specified\.$#'
357357
count: 1
358358
path: ../../tests/system/Models/SaveModelTest.php
359359

360360
-
361-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:272\:\:\$_options has no type specified\.$#'
361+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:274\:\:\$_options has no type specified\.$#'
362362
count: 1
363363
path: ../../tests/system/Models/SaveModelTest.php
364364

365365
-
366-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:272\:\:\$created_at has no type specified\.$#'
366+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:274\:\:\$created_at has no type specified\.$#'
367367
count: 1
368368
path: ../../tests/system/Models/SaveModelTest.php
369369

370370
-
371-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:272\:\:\$id has no type specified\.$#'
371+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:274\:\:\$id has no type specified\.$#'
372372
count: 1
373373
path: ../../tests/system/Models/SaveModelTest.php
374374

375375
-
376-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:272\:\:\$name has no type specified\.$#'
376+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:274\:\:\$name has no type specified\.$#'
377377
count: 1
378378
path: ../../tests/system/Models/SaveModelTest.php
379379

380380
-
381-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:272\:\:\$updated_at has no type specified\.$#'
381+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/SaveModelTest\.php\:274\:\:\$updated_at has no type specified\.$#'
382382
count: 1
383383
path: ../../tests/system/Models/SaveModelTest.php
384384

385385
-
386-
message: '#^Property CodeIgniter\\Model@anonymous/tests/system/Models/SaveModelTest\.php\:288\:\:\$name has no type specified\.$#'
386+
message: '#^Property CodeIgniter\\Model@anonymous/tests/system/Models/SaveModelTest\.php\:290\:\:\$name has no type specified\.$#'
387387
count: 1
388388
path: ../../tests/system/Models/SaveModelTest.php
389389

0 commit comments

Comments
 (0)