From feb5d8b25900c9bdb3899c890e88fd0ddf902ac7 Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 20:08:54 +0000 Subject: [PATCH 1/4] CI: remove kodiak, use PHP 8.2-8.5 test matrix --- .github/.kodiak.toml | 10 ---------- .github/workflows/tests.yml | 22 ++++++++++++++-------- 2 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 .github/.kodiak.toml diff --git a/.github/.kodiak.toml b/.github/.kodiak.toml deleted file mode 100644 index 60c34b6..0000000 --- a/.github/.kodiak.toml +++ /dev/null @@ -1,10 +0,0 @@ -version = 1 - -[merge] -automerge_label = "automerge" -blacklist_title_regex = "^WIP.*" -blacklist_labels = ["WIP"] -method = "rebase" -delete_branch_on_merge = true -notify_on_conflict = true -optimistic_updates = false diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a574bd1..7d85dd5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,33 +5,39 @@ on: workflow_dispatch: push: - branches: [ "*" ] + branches: ["*"] schedule: - cron: "0 8 * * 1" jobs: - test83: + test85: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.3" + php: "8.5" - test82: + test84: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.2" + php: "8.4" - test81: + test83: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.1" + php: "8.3" + + test82: + name: "Nette Tester" + uses: contributte/.github/.github/workflows/nette-tester.yml@master + with: + php: "8.2" testlower: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.1" + php: "8.2" composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest" From f4dbe8b978c8ce1970d74b482471d0a1843658b0 Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 20:09:02 +0000 Subject: [PATCH 2/4] Config: use PHP 8.2 as base version --- phpstan.neon | 2 +- ruleset.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 5260d60..bac8562 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,7 +3,7 @@ includes: parameters: level: 9 - phpVersion: 80100 + phpVersion: 80200 scanDirectories: - src diff --git a/ruleset.xml b/ruleset.xml index d02bd3d..bb249f0 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -1,7 +1,7 @@ - + From 8bf09be859a6f44971f6cb41d8e5184e18cdf915 Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 20:09:10 +0000 Subject: [PATCH 3/4] Composer: require PHP 8.2, use full versions, add autoload-dev --- composer.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 98ef8b0..1baa9cf 100644 --- a/composer.json +++ b/composer.json @@ -13,16 +13,16 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.2", "nette/database": "^3.1.9", "nette/php-generator": "^4.1.2", "nette/utils": "^4.0.3", "doctrine/inflector": "^2.0.8" }, "require-dev": { - "contributte/qa": "^0.4", - "contributte/tester": "^0.4", - "contributte/phpstan": "^0.1", + "contributte/qa": "^0.4.0", + "contributte/tester": "^0.4.0", + "contributte/phpstan": "^0.1.0", "tracy/tracy": "^2.10.5" }, "autoload": { @@ -30,6 +30,11 @@ "Contributte\\Nextras\\Orm\\Generator\\": "src/" } }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests" + } + }, "minimum-stability": "dev", "prefer-stable": true, "extra": { From 31fe56f44b29630dcbd744a6a327a82505542e3f Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 20:09:18 +0000 Subject: [PATCH 4/4] Code: fix PHPStan errors in DatabaseAnalyser --- src/Analyser/Database/DatabaseAnalyser.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Analyser/Database/DatabaseAnalyser.php b/src/Analyser/Database/DatabaseAnalyser.php index c0ae9e7..da06c38 100644 --- a/src/Analyser/Database/DatabaseAnalyser.php +++ b/src/Analyser/Database/DatabaseAnalyser.php @@ -66,13 +66,14 @@ protected function analyseColumns(Table $table): void $column->setName($col['name']); $column->setNullable($col['nullable']); $column->setType(Helpers::columnType($col['nativetype'])); - $column->setDefault($col['default']); + $column->setDefault(is_scalar($col['default']) ? (string) $col['default'] : null); $column->setOnUpdate(str_contains($col['vendor']['extra'] ?? $col['vendor']['Extra'] ?? '', 'on update')); // Analyse ENUM if ($col['nativetype'] === ColumnTypes::NATIVE_TYPE_ENUM) { + /** @var array> $enum */ $enum = Strings::matchAll($col['vendor']['type'] ?? $col['vendor']['Type'], ColumnTypes::NATIVE_REGEX_ENUM, PREG_PATTERN_ORDER); - if ($enum !== []) { + if (isset($enum[1])) { $column->setEnum($enum[1]); $column->setType(ColumnTypes::TYPE_ENUM); $column->setSubtype(Helpers::columnType($col['nativetype']));