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" 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": { 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 @@ - + 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)); }