Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/.kodiak.toml

This file was deleted.

22 changes: 14 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 1 addition & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ includes:

parameters:
level: 9
phpVersion: 80100
phpVersion: 80200

scanDirectories:
- src
Expand All @@ -14,5 +14,3 @@ parameters:
paths:
- src
- .docs

ignoreErrors:
2 changes: 1 addition & 1 deletion ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Contributte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<!-- Rulesets -->
<rule ref="./vendor/contributte/qa/ruleset-8.0.xml"/>
<rule ref="./vendor/contributte/qa/ruleset-8.2.xml"/>

<!-- Rules -->
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
Expand Down
6 changes: 4 additions & 2 deletions src/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion src/DI/SchedulerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down