diff --git a/README.md b/README.md
index 76c4750..5a7f98a 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ Define background jobs in standard crontab format and the Cron Runner will execu
-
+
## Example usage
diff --git a/bin/cron b/bin/cron
index ee84f72..4108551 100755
--- a/bin/cron
+++ b/bin/cron
@@ -3,7 +3,7 @@
use Gt\Cli\Application;
use Gt\Cli\Argument\CommandArgumentList;
-use Gt\Cron\Cli\RunCommand;
+use GT\Cron\Cli\RunCommand;
$autoloadLocations = [
getcwd() . "/vendor/autoload.php",
diff --git a/composer.json b/composer.json
index 4ad9174..b0aa7e4 100644
--- a/composer.json
+++ b/composer.json
@@ -18,12 +18,13 @@
"autoload": {
"psr-4": {
+ "GT\\Cron\\": "./src/",
"Gt\\Cron\\": "./src/"
}
},
"autoload-dev": {
"psr-4": {
- "Gt\\Cron\\Test\\": "./test/phpunit/"
+ "GT\\Cron\\Test\\": "./test/phpunit/"
}
},
@@ -47,7 +48,7 @@
"funding": [
{
"type": "github",
- "url": "https://github.com/sponsors/PhpGt"
+ "url": "https://github.com/sponsors/phpgt"
}
]
}
diff --git a/composer.lock b/composer.lock
index 17d5557..09e30c4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -59,16 +59,16 @@
},
{
"name": "phpgt/async",
- "version": "v1.0.1",
+ "version": "v1.0.3",
"source": {
"type": "git",
"url": "https://github.com/phpgt/Async.git",
- "reference": "3daab887eacd04d297a1383a22957f0ab7ecaf68"
+ "reference": "d1f3679f4200e32457b57211f49b999641ef8fa4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpgt/Async/zipball/3daab887eacd04d297a1383a22957f0ab7ecaf68",
- "reference": "3daab887eacd04d297a1383a22957f0ab7ecaf68",
+ "url": "https://api.github.com/repos/phpgt/Async/zipball/d1f3679f4200e32457b57211f49b999641ef8fa4",
+ "reference": "d1f3679f4200e32457b57211f49b999641ef8fa4",
"shasum": ""
},
"require": {
@@ -85,6 +85,7 @@
"type": "library",
"autoload": {
"psr-4": {
+ "GT\\Async\\": "./src",
"Gt\\Async\\": "./src"
}
},
@@ -95,15 +96,15 @@
"description": "Promise-based non-blocking operations.",
"support": {
"issues": "https://github.com/phpgt/Async/issues",
- "source": "https://github.com/phpgt/Async/tree/v1.0.1"
+ "source": "https://github.com/phpgt/Async/tree/v1.0.3"
},
"funding": [
{
- "url": "https://github.com/phpgt",
+ "url": "https://github.com/sponsors/PhpGt",
"type": "github"
}
],
- "time": "2025-03-07T17:26:32+00:00"
+ "time": "2026-05-04T16:34:25+00:00"
},
{
"name": "phpgt/cli",
@@ -328,16 +329,16 @@
},
{
"name": "phpgt/dataobject",
- "version": "v1.1.0",
+ "version": "v1.1.1",
"source": {
"type": "git",
- "url": "https://github.com/PhpGt/DataObject.git",
- "reference": "534b593617e40f62ba5ea5a399797e4b0107a40a"
+ "url": "https://github.com/phpgt/DataObject.git",
+ "reference": "fc1918f2c1a9f3329d8d80bd01f3658cf07961ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PhpGt/DataObject/zipball/534b593617e40f62ba5ea5a399797e4b0107a40a",
- "reference": "534b593617e40f62ba5ea5a399797e4b0107a40a",
+ "url": "https://api.github.com/repos/phpgt/DataObject/zipball/fc1918f2c1a9f3329d8d80bd01f3658cf07961ba",
+ "reference": "fc1918f2c1a9f3329d8d80bd01f3658cf07961ba",
"shasum": ""
},
"require": {
@@ -347,13 +348,14 @@
},
"require-dev": {
"phpmd/phpmd": "^2.13",
- "phpstan/phpstan": "^1.10",
+ "phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^10.1",
- "squizlabs/php_codesniffer": "^3.7"
+ "squizlabs/php_codesniffer": "^4.0"
},
"type": "library",
"autoload": {
"psr-4": {
+ "GT\\DataObject\\": "./src",
"Gt\\DataObject\\": "./src"
}
},
@@ -369,16 +371,16 @@
],
"description": " Structured, type-safe, immutable data transfer.",
"support": {
- "issues": "https://github.com/PhpGt/DataObject/issues",
- "source": "https://github.com/PhpGt/DataObject/tree/v1.1.0"
+ "issues": "https://github.com/phpgt/DataObject/issues",
+ "source": "https://github.com/phpgt/DataObject/tree/v1.1.1"
},
"funding": [
{
- "url": "https://github.com/phpgt",
+ "url": "https://github.com/sponsors/phpgt",
"type": "github"
}
],
- "time": "2025-02-14T16:43:15+00:00"
+ "time": "2026-04-21T12:24:50+00:00"
},
{
"name": "phpgt/http",
@@ -707,16 +709,16 @@
},
{
"name": "phpgt/typesafegetter",
- "version": "v1.3.3",
+ "version": "v1.3.4",
"source": {
"type": "git",
"url": "https://github.com/phpgt/TypeSafeGetter.git",
- "reference": "a0d339103828791989cbb81f760d252f3c2f8b8c"
+ "reference": "729261c04b76febaa21a921a3719f625abe9b55e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpgt/TypeSafeGetter/zipball/a0d339103828791989cbb81f760d252f3c2f8b8c",
- "reference": "a0d339103828791989cbb81f760d252f3c2f8b8c",
+ "url": "https://api.github.com/repos/phpgt/TypeSafeGetter/zipball/729261c04b76febaa21a921a3719f625abe9b55e",
+ "reference": "729261c04b76febaa21a921a3719f625abe9b55e",
"shasum": ""
},
"require": {
@@ -731,6 +733,7 @@
"type": "library",
"autoload": {
"psr-4": {
+ "GT\\TypeSafeGetter\\": "./src",
"Gt\\TypeSafeGetter\\": "./src"
}
},
@@ -747,7 +750,7 @@
"description": "An interface for objects that expose type-safe getter methods.",
"support": {
"issues": "https://github.com/phpgt/TypeSafeGetter/issues",
- "source": "https://github.com/phpgt/TypeSafeGetter/tree/v1.3.3"
+ "source": "https://github.com/phpgt/TypeSafeGetter/tree/v1.3.4"
},
"funding": [
{
@@ -755,7 +758,7 @@
"type": "github"
}
],
- "time": "2026-03-10T22:28:01+00:00"
+ "time": "2026-05-04T15:53:13+00:00"
},
{
"name": "psr/container",
@@ -3015,16 +3018,16 @@
},
{
"name": "symfony/config",
- "version": "v7.4.8",
+ "version": "v7.4.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "2d19dde43fa2ff720b9a40763ace7226594f503b"
+ "reference": "d91b6c7cd2a8c9a9c2b8d26c8f5ed48edf99ef57"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/2d19dde43fa2ff720b9a40763ace7226594f503b",
- "reference": "2d19dde43fa2ff720b9a40763ace7226594f503b",
+ "url": "https://api.github.com/repos/symfony/config/zipball/d91b6c7cd2a8c9a9c2b8d26c8f5ed48edf99ef57",
+ "reference": "d91b6c7cd2a8c9a9c2b8d26c8f5ed48edf99ef57",
"shasum": ""
},
"require": {
@@ -3070,7 +3073,7 @@
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/config/tree/v7.4.8"
+ "source": "https://github.com/symfony/config/tree/v7.4.10"
},
"funding": [
{
@@ -3090,20 +3093,20 @@
"type": "tidelift"
}
],
- "time": "2026-03-24T13:12:05+00:00"
+ "time": "2026-05-03T14:20:49+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v7.4.8",
+ "version": "v7.4.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "f7025fd7b687c240426562f86ada06a93b1e771d"
+ "reference": "4eb0d9dfa9d4f7c59216baf49b3ed6b1fb72293d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f7025fd7b687c240426562f86ada06a93b1e771d",
- "reference": "f7025fd7b687c240426562f86ada06a93b1e771d",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4eb0d9dfa9d4f7c59216baf49b3ed6b1fb72293d",
+ "reference": "4eb0d9dfa9d4f7c59216baf49b3ed6b1fb72293d",
"shasum": ""
},
"require": {
@@ -3154,7 +3157,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/dependency-injection/tree/v7.4.8"
+ "source": "https://github.com/symfony/dependency-injection/tree/v7.4.10"
},
"funding": [
{
@@ -3174,20 +3177,20 @@
"type": "tidelift"
}
],
- "time": "2026-03-31T06:50:29+00:00"
+ "time": "2026-05-06T11:55:30+00:00"
},
{
"name": "symfony/deprecation-contracts",
- "version": "v3.6.0",
+ "version": "v3.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
+ "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
- "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b",
+ "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b",
"shasum": ""
},
"require": {
@@ -3200,7 +3203,7 @@
"name": "symfony/contracts"
},
"branch-alias": {
- "dev-main": "3.6-dev"
+ "dev-main": "3.7-dev"
}
},
"autoload": {
@@ -3225,7 +3228,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0"
},
"funding": [
{
@@ -3236,25 +3239,29 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
- "time": "2024-09-25T14:21:43+00:00"
+ "time": "2026-04-13T15:52:40+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v7.4.8",
+ "version": "v7.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5"
+ "reference": "dcd8f96bcdc0f128ec406c765cc066c6035d1be3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/58b9790d12f9670b7f53a1c1738febd3108970a5",
- "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/dcd8f96bcdc0f128ec406c765cc066c6035d1be3",
+ "reference": "dcd8f96bcdc0f128ec406c765cc066c6035d1be3",
"shasum": ""
},
"require": {
@@ -3291,7 +3298,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v7.4.8"
+ "source": "https://github.com/symfony/filesystem/tree/v7.4.9"
},
"funding": [
{
@@ -3311,20 +3318,20 @@
"type": "tidelift"
}
],
- "time": "2026-03-24T13:12:05+00:00"
+ "time": "2026-04-18T13:18:21+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.33.0",
+ "version": "v1.37.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
+ "reference": "141046a8f9477948ff284fa65be2095baafb94f2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
- "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2",
+ "reference": "141046a8f9477948ff284fa65be2095baafb94f2",
"shasum": ""
},
"require": {
@@ -3374,7 +3381,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0"
},
"funding": [
{
@@ -3394,20 +3401,20 @@
"type": "tidelift"
}
],
- "time": "2024-09-09T11:45:10+00:00"
+ "time": "2026-04-10T16:19:22+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.33.0",
+ "version": "v1.37.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
+ "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
- "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315",
+ "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315",
"shasum": ""
},
"require": {
@@ -3459,7 +3466,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.37.0"
},
"funding": [
{
@@ -3479,20 +3486,20 @@
"type": "tidelift"
}
],
- "time": "2024-12-23T08:48:59+00:00"
+ "time": "2026-04-10T17:25:58+00:00"
},
{
"name": "symfony/service-contracts",
- "version": "v3.6.1",
+ "version": "v3.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43"
+ "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43",
- "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a",
+ "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a",
"shasum": ""
},
"require": {
@@ -3510,7 +3517,7 @@
"name": "symfony/contracts"
},
"branch-alias": {
- "dev-main": "3.6-dev"
+ "dev-main": "3.7-dev"
}
},
"autoload": {
@@ -3546,7 +3553,7 @@
"standards"
],
"support": {
- "source": "https://github.com/symfony/service-contracts/tree/v3.6.1"
+ "source": "https://github.com/symfony/service-contracts/tree/v3.7.0"
},
"funding": [
{
@@ -3566,20 +3573,20 @@
"type": "tidelift"
}
],
- "time": "2025-07-15T11:30:57+00:00"
+ "time": "2026-03-28T09:44:51+00:00"
},
{
"name": "symfony/var-exporter",
- "version": "v7.4.8",
+ "version": "v7.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
- "reference": "398907e89a2a56fe426f7955c6fa943ec0c77225"
+ "reference": "22e03a49c95ef054a43601cd159b222bfab1c701"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/398907e89a2a56fe426f7955c6fa943ec0c77225",
- "reference": "398907e89a2a56fe426f7955c6fa943ec0c77225",
+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/22e03a49c95ef054a43601cd159b222bfab1c701",
+ "reference": "22e03a49c95ef054a43601cd159b222bfab1c701",
"shasum": ""
},
"require": {
@@ -3627,7 +3634,7 @@
"serialize"
],
"support": {
- "source": "https://github.com/symfony/var-exporter/tree/v7.4.8"
+ "source": "https://github.com/symfony/var-exporter/tree/v7.4.9"
},
"funding": [
{
@@ -3647,7 +3654,7 @@
"type": "tidelift"
}
],
- "time": "2026-03-24T13:12:05+00:00"
+ "time": "2026-04-18T13:18:21+00:00"
},
{
"name": "theseer/tokenizer",
diff --git a/example/01-run-due-jobs.php b/example/01-run-due-jobs.php
index 9723072..985088b 100644
--- a/example/01-run-due-jobs.php
+++ b/example/01-run-due-jobs.php
@@ -1,9 +1,9 @@
writeCronContents($cronContents);
$stream = $this->getStream();
@@ -177,7 +177,7 @@ public function testRunNowFunction() {
public function testRunNowFunctionWithArguments() {
$cronContents = <<writeCronContents($cronContents);
$stream = $this->getStream();
@@ -190,26 +190,26 @@ public function testRunNowFunctionWithArguments() {
self::assertEquals(
"",
- \Gt\Cron\Test\Helper\ExampleClass::$message
+ \GT\Cron\Test\Helper\ExampleClass::$message
);
self::assertEquals(
0,
- \Gt\Cron\Test\Helper\ExampleClass::$counter
+ \GT\Cron\Test\Helper\ExampleClass::$counter
);
$command->run($args);
self::assertEquals(
"a test message",
- \Gt\Cron\Test\Helper\ExampleClass::$message
+ \GT\Cron\Test\Helper\ExampleClass::$message
);
self::assertEquals(
123,
- \Gt\Cron\Test\Helper\ExampleClass::$counter
+ \GT\Cron\Test\Helper\ExampleClass::$counter
);
}
public function testRunNowFunctionNoSlash() {
$cronContents = <<writeCronContents($cronContents);
$stream = $this->getStream();
@@ -222,7 +222,7 @@ public function testRunNowFunctionNoSlash() {
$command->run($args);
self::assertEquals(
1,
- \Gt\Cron\Test\Helper\ExampleClass::$calls
+ \GT\Cron\Test\Helper\ExampleClass::$calls
);
}
@@ -365,7 +365,7 @@ function($command)use(&$calledCommand) {
public function testRunNowScriptAndFunction() {
$cronContents = <<writeCronContents($cronContents);
$stream = $this->getStream();
@@ -393,7 +393,7 @@ function($command)use(&$calledCommand) {
);
self::assertEquals(
1,
- \Gt\Cron\Test\Helper\ExampleClass::$calls
+ \GT\Cron\Test\Helper\ExampleClass::$calls
);
$output = $this->getFullOutput($stream);
@@ -432,7 +432,7 @@ public function testRunNowScriptNotExists() {
public function testRunNowFunctionNotExists() {
$cronContents = <<writeCronContents($cronContents);
$stream = $this->getStream();
@@ -448,7 +448,7 @@ public function testRunNowFunctionNotExists() {
$command->run($args);
$this->assertStreamError(
- "Error executing function: Gt\\Cron\\Test\\Nothing::thisDoesNotExist",
+ "Error executing function: GT\\Cron\\Test\\Nothing::thisDoesNotExist",
$stream
);
}
diff --git a/test/phpunit/CronExpressionTest.php b/test/phpunit/CronExpressionTest.php
index 5f94404..7b48783 100644
--- a/test/phpunit/CronExpressionTest.php
+++ b/test/phpunit/CronExpressionTest.php
@@ -1,8 +1,8 @@
isCallable(
- "Gt\\Cron\\Test\\Helper\\ExampleClass::doSomething"
+ "GT\\Cron\\Test\\Helper\\ExampleClass::doSomething"
));
}
@@ -31,7 +31,7 @@ public function testExecuteCallsFunctionWithArguments():void {
$command = new FunctionCommand();
$command->execute(
- 'Gt\\Cron\\Test\\Helper\\ExampleClass::doSomething("hello", 5)'
+ 'GT\\Cron\\Test\\Helper\\ExampleClass::doSomething("hello", 5)'
);
self::assertSame(1, ExampleClass::$calls);
@@ -44,7 +44,7 @@ public function testExecuteThrowsForMissingMethod():void {
self::expectException(FunctionExecutionException::class);
$command->execute(
- "Gt\\Cron\\Test\\Helper\\ExampleClass::doesNotExist"
+ "GT\\Cron\\Test\\Helper\\ExampleClass::doesNotExist"
);
}
}
diff --git a/test/phpunit/Helper/ExampleClass.php b/test/phpunit/Helper/ExampleClass.php
index a2c5ae7..0e6927a 100644
--- a/test/phpunit/Helper/ExampleClass.php
+++ b/test/phpunit/Helper/ExampleClass.php
@@ -1,5 +1,5 @@
mockExpression(),
$command
diff --git a/test/phpunit/QueueRepositoryTest.php b/test/phpunit/QueueRepositoryTest.php
index 5e0e420..be061d7 100644
--- a/test/phpunit/QueueRepositoryTest.php
+++ b/test/phpunit/QueueRepositoryTest.php
@@ -1,8 +1,8 @@