From 7fce7c636dbd89c11859845e74e0d78701186396 Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 17 Jan 2024 05:30:42 +0900 Subject: [PATCH 1/4] chore: update php-cs-fixer vertion to ^3.47.1 --- admin/framework/composer.json | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/framework/composer.json b/admin/framework/composer.json index 9df02a62db0f..891bff556031 100644 --- a/admin/framework/composer.json +++ b/admin/framework/composer.json @@ -20,7 +20,7 @@ "require-dev": { "codeigniter/coding-standard": "^1.7", "fakerphp/faker": "^1.9", - "friendsofphp/php-cs-fixer": "~3.46.0", + "friendsofphp/php-cs-fixer": "^3.47.1", "kint-php/kint": "^5.0.4", "mikey179/vfsstream": "^1.6", "nexusphp/cs-config": "^3.6", diff --git a/composer.json b/composer.json index 7331880e41cf..c20e425c9932 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "codeigniter/phpstan-codeigniter": "^1.4", "ergebnis/composer-normalize": "^2.28", "fakerphp/faker": "^1.9", - "friendsofphp/php-cs-fixer": "~3.46.0", + "friendsofphp/php-cs-fixer": "^3.47.1", "kint-php/kint": "^5.0.4", "mikey179/vfsstream": "^1.6", "nexusphp/cs-config": "^3.6", From 1d8eb00249340bbed524945ccff3a64a46fca30b Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 17 Jan 2024 05:32:21 +0900 Subject: [PATCH 2/4] style: fix stdclass -> stdClass --- system/Database/SQLite3/Table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Database/SQLite3/Table.php b/system/Database/SQLite3/Table.php index b733e980b30e..77fd8699459f 100644 --- a/system/Database/SQLite3/Table.php +++ b/system/Database/SQLite3/Table.php @@ -12,7 +12,7 @@ namespace CodeIgniter\Database\SQLite3; use CodeIgniter\Database\Exceptions\DataException; -use stdclass; +use stdClass; /** * Class Table From 8b2a99122aebcd2f462a53eac3f1b03249a7c12c Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 17 Jan 2024 05:33:12 +0900 Subject: [PATCH 3/4] test: composer cs-fix --- tests/system/Database/Live/SQLite/GetIndexDataTest.php | 6 +++--- tests/system/Debug/ExceptionsTest.php | 2 +- tests/system/View/ViewTest.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/system/Database/Live/SQLite/GetIndexDataTest.php b/tests/system/Database/Live/SQLite/GetIndexDataTest.php index 7a3c649c9392..c8b34d7ee651 100644 --- a/tests/system/Database/Live/SQLite/GetIndexDataTest.php +++ b/tests/system/Database/Live/SQLite/GetIndexDataTest.php @@ -75,19 +75,19 @@ public function testGetIndexData(): void $expectedIndexes = []; - $row = new stdclass(); + $row = new stdClass(); $row->name = 'PRIMARY'; $row->fields = ['id']; $row->type = 'PRIMARY'; $expectedIndexes['PRIMARY'] = $row; - $row = new stdclass(); + $row = new stdClass(); $row->name = 'testuser_email'; $row->fields = ['email']; $row->type = 'UNIQUE'; $expectedIndexes['testuser_email'] = $row; - $row = new stdclass(); + $row = new stdClass(); $row->name = 'testuser_country'; $row->fields = ['country']; $row->type = 'INDEX'; diff --git a/tests/system/Debug/ExceptionsTest.php b/tests/system/Debug/ExceptionsTest.php index 4a30a32f1133..8c85a69006a0 100644 --- a/tests/system/Debug/ExceptionsTest.php +++ b/tests/system/Debug/ExceptionsTest.php @@ -31,7 +31,7 @@ final class ExceptionsTest extends CIUnitTestCase { use ReflectionHelper; - private \CodeIgniter\Debug\Exceptions $exception; + private Exceptions $exception; public static function setUpBeforeClass(): void { diff --git a/tests/system/View/ViewTest.php b/tests/system/View/ViewTest.php index 3f3b28827a00..3b3b7daf3476 100644 --- a/tests/system/View/ViewTest.php +++ b/tests/system/View/ViewTest.php @@ -27,7 +27,7 @@ final class ViewTest extends CIUnitTestCase { private FileLocator $loader; private string $viewsDir; - private \Config\View $config; + private Config\View $config; protected function setUp(): void { From 4fc5e1c97c80d262f55415295e6692714d6d9c97 Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 17 Jan 2024 05:39:05 +0900 Subject: [PATCH 4/4] chore: remove ignoreErrors --- phpstan-baseline.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/phpstan-baseline.php b/phpstan-baseline.php index e63572442810..738fd6d6f6d8 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -1666,11 +1666,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/SQLite3/PreparedQuery.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Class stdClass referenced with incorrect case\\: stdclass\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/system/Database/SQLite3/Table.php', -]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2,