From b0f1c77bcc5f855355aeafd3bc93fed3f8f58fc9 Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 17:45:34 +0000 Subject: [PATCH 1/4] CI: use PHP 8.2 base, add PHP 8.4 and 8.5 tests --- .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 91a9dbfb6ec23fdd83964cf88f2d9eb1e07f006c Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 17:45:45 +0000 Subject: [PATCH 2/4] Code: add type assertions for PHPStan level 9 --- src/Command/ListCommand.php | 6 ++++-- src/DI/SchedulerExtension.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Command/ListCommand.php b/src/Command/ListCommand.php index 77d92ec..d3b2353 100644 --- a/src/Command/ListCommand.php +++ b/src/Command/ListCommand.php @@ -69,8 +69,10 @@ private static function formatRow(string $key, IJob $job, DateTime $dateTime): a $row[] = $callback; } elseif (is_array($callback)) { $class = $callback[0]; - $callback = $callback[1]; - $row[] = $class::class . '->' . $callback . '()'; + $method = $callback[1]; + assert(is_object($class)); + assert(is_string($method)); + $row[] = $class::class . '->' . $method . '()'; } else { throw new LogicalException('Unknown callback'); } diff --git a/src/DI/SchedulerExtension.php b/src/DI/SchedulerExtension.php index 267329b..d3f4bc4 100644 --- a/src/DI/SchedulerExtension.php +++ b/src/DI/SchedulerExtension.php @@ -76,7 +76,7 @@ public function loadConfiguration(): void } else { // Class config with optional inject $class = $jobConfig['class'] ?? null; - if ($class === null) { + if ($class === null || !is_string($class)) { throw new InvalidArgumentException(sprintf('Option "class" of %s > jobs > %s must be configured', $this->name, $jobName)); } From 25f57c890a72fae8f1313b747ecac408c3765f68 Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 17:45:52 +0000 Subject: [PATCH 3/4] Config: use PHP 8.2 base, remove empty sections --- phpstan.neon | 4 +--- ruleset.xml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 562ab05..cd64186 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,7 +3,7 @@ includes: parameters: level: 9 - phpVersion: 80100 + phpVersion: 80200 scanDirectories: - src @@ -14,5 +14,3 @@ parameters: paths: - src - .docs - - ignoreErrors: diff --git a/ruleset.xml b/ruleset.xml index f6061ee..a4ef64c 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -1,7 +1,7 @@ - + From 954cd14e586ce85a195a72749c86d0a38dfaf1f2 Mon Sep 17 00:00:00 2001 From: Contributte AI Date: Sun, 4 Jan 2026 17:46:00 +0000 Subject: [PATCH 4/4] Composer: require PHP 8.2+, add Symfony 8.x support --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 60b7fb3..35601a7 100644 --- a/composer.json +++ b/composer.json @@ -21,16 +21,16 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.2", "nette/di": "^3.1.8", "dragonmantank/cron-expression": "^3.3.3", - "symfony/console": "^6.4.1 || ^7.0.1" + "symfony/console": "^6.4.1 || ^7.0.1 || ^8.0.0" }, "require-dev": { - "mockery/mockery": "^1.6.7", - "contributte/qa": "^0.4", - "contributte/tester": "^0.4", - "contributte/phpstan": "^0.1", + "mockery/mockery": "^1.6.12", + "contributte/qa": "^0.4.0", + "contributte/tester": "^0.4.0", + "contributte/phpstan": "^0.2.0", "tracy/tracy": "^2.10.5" }, "autoload": {