Releases: WyriHaximus/reactphp-cron
Releases · WyriHaximus/reactphp-cron
5.0.0
Error handling
With promise v3 uncaught rejected promises will no longer bubble up. As a result the running con instance will now emit
errors when they occur and those must be handled.
$cron = Cron::create(...$actions);
$cron->on('error', static function (Throwable $throwable): void {
// Handle error
});
5.0.0
- Total issues resolved: 0
- Total pull requests resolved: 10
- Total contributors: 3
Dependencies 📦
- 82: Bump async test utils to v8 thanks to @WyriHaximus
- 79: Update dependency react/promise to v3 thanks to @renovate[bot]
- 76: Bump composer/composer from 2.5.5 to 2.7.2 thanks to @dependabot[bot]
- 75: Bump react/promise from 2.9.0 to 2.10.0 thanks to @dependabot[bot]
- 74: Bump wyrihaximus/async-test-utilities from 5.0.25 to 7.0.0 thanks to @dependabot[bot]
- 72: Bump guzzlehttp/psr7 from 2.4.3 to 2.5.0 thanks to @dependabot[bot]
- 71: Bump thecodingmachine/safe from 2.4.0 to 2.5.0 thanks to @dependabot[bot]
Dependencies 📦,Enhancement ✨
Enhancement ✨
4.0.0
v4 makes the major shift of running all actions in a fiber, as such you can use await()
in them by default without having to wrap them yourself inside an async()
. This is code wise a tiny change but with a huge impact. The ActionInterface
needed to be changed so it became a new major release, and running each action in a fiber has a neglectable performance impact.
4.0.0
- Total issues resolved: 0
- Total pull requests resolved: 4
- Total contributors: 2
CI 🚧,Configuration ⚙,Dependencies 📦,Documentation 📚,JSON 👨💼,MarkDown 📝,PHP 🐘,YAML 🍄
- 70: Tidying up package file thanks to @WyriHaximus
CI 🚧,Configuration ⚙,Dependencies 📦,Feature 🏗,JSON 👨💼,PHP 🐘,Source 🔮,Tests 🧪,YAML 🍄
Dependencies 📦,PHP 🐘
- 61: Bump wyrihaximus/react-mutex from 2.0.0 to 3.1.0 thanks to @dependabot[bot]
- 60: Bump wyrihaximus/react-mutex from 2.0.0 to 3.0.0 thanks to @dependabot[bot]
3.1.0
3.1.0
- Total issues resolved: 0
- Total pull requests resolved: 3
- Total contributors: 2
Dependencies 📦,JSON 👨💼,PHP 🐘
Configuration ⚙,YAML 🍄
Dependencies 📦,PHP 🐘
3.0.0
Switch to global event loop accessor
<?php
use React�ventLoop\Factory;
use React\Promise\PromiseInterface;
use function React\Promise
esolve;
use WyriHaximus\React\Action;
use WyriHaximus\React\Cron;
require 'vendor/autoload.php';
$loop = Factory::create();
Cron::createHighPrecision(
$loop,
new Action(
'Hour', // Identifier used for mutex locking locking
'@hourly', // The cron expression used to schedule this action
function (): PromiseInterface { // The callable ran when this action is due according to it's schedule
echo 'Another hour has passed!', PHP_EOL;
return resolve(true); // This callable MUST return a promise, which is used for releasing the mutex lock
}
),
new Action(
'Minute',
'* * * * *',
function (): PromiseInterface {
echo 'Another minute has passed!', PHP_EOL;
return resolve(true);
}
)
);
$loop->run();
To:
<?php
use React�ventLoop\Factory;
use React�ventLoop\Loop;
use React\Promise\PromiseInterface;
use function React\Promise
esolve;
use WyriHaximus\React\Cron;
require 'vendor/autoload.php';
Cron::create(
new Cron\Action(
'Hour', // Identifier used for mutex locking locking
1, // TTL for Mutex Locking (usually a few times the maximum time this cron should take)
'@hourly', // The cron expression used to schedule this action
function (): PromiseInterface { // The callable ran when this action is due according to it's schedule
echo 'Another hour has passed!', PHP_EOL;
return resolve(true); // This callable MUST return a promise, which is used for releasing the mutex lock
}
),
new Cron\Action(
'Minute',
300,
'* * * * *',
function (): PromiseInterface {
echo 'Another minute has passed!', PHP_EOL;
return resolve(true);
}
)
);
PHP 8
The release adds PHP 8 support!
3.0.0
- Total issues resolved: 0
- Total pull requests resolved: 7
- Total contributors: 2
Documentation 📚,MarkDown 📝
PHP 🐘,Source 🔮
- 56: Don't run initial tick thanks to @WyriHaximus
PHP 🐘
Dependencies 📦,JSON 👨💼,PHP 🐘
- 54: Unlock PHP 8 thanks to @WyriHaximus
- 49: Bump wyrihaximus/async-test-utilities from 3.4.23 to 3.4.24 thanks to @dependabot[bot]
Dependencies 📦,JSON 👨💼,PHP 🐘,Source 🔮,Tests 🧪,enhancement
-
51: Switch to use the global event-loop thanks to @WyriHaximus
-
50: Drop Qodana from CI thanks to @WyriHaximus
2.1.2
2.1.2
- Total issues resolved: 0
- Total pull requests resolved: 2
- Total contributors: 1
PHP 🐘,Source 🔮,bug
2.1.1
2.1.1
- Total issues resolved: 0
- Total pull requests resolved: 16
- Total contributors: 2
Dependencies 📦,JSON 👨💼,PHP 🐘,Source 🔮
Dependencies 📦,JSON 👨💼,PHP 🐘
- 45: Bump wyrihaximus/async-test-utilities from 3.4.22 to 3.4.23 thanks to @dependabot[bot]
- 44: Bump wyrihaximus/async-test-utilities from 3.4.21 to 3.4.22 thanks to @dependabot[bot]
- 43: Bump wyrihaximus/async-test-utilities from 3.4.20 to 3.4.21 thanks to @dependabot[bot]
- 42: Bump wyrihaximus/async-test-utilities from 3.4.19 to 3.4.20 thanks to @dependabot[bot]
- 41: Bump wyrihaximus/async-test-utilities from 3.4.18 to 3.4.19 thanks to @dependabot[bot]
- 40: Bump wyrihaximus/async-test-utilities from 3.4.17 to 3.4.18 thanks to @dependabot[bot]
- 39: Bump wyrihaximus/async-test-utilities from 3.4.15 to 3.4.17 thanks to @dependabot[bot]
- 38: Bump wyrihaximus/async-test-utilities from 3.4.15 to 3.4.16 thanks to @dependabot[bot]
- 37: Bump wyrihaximus/async-test-utilities from 3.4.14 to 3.4.15 thanks to @dependabot[bot]
- 36: Bump wyrihaximus/async-test-utilities from 3.4.13 to 3.4.14 thanks to @dependabot[bot]
- 35: Bump wyrihaximus/async-test-utilities from 3.4.12 to 3.4.13 thanks to @dependabot[bot]
- 34: Bump wyrihaximus/async-test-utilities from 3.4.11 to 3.4.12 thanks to @dependabot[bot]
- 33: Bump wyrihaximus/async-test-utilities from 3.4.10 to 3.4.11 thanks to @dependabot[bot]
- 32: Bump wyrihaximus/async-test-utilities from 3.4.9 to 3.4.10 thanks to @dependabot[bot]
- 31: Bump wyrihaximus/async-test-utilities from 3.4.8 to 3.4.9 thanks to @dependabot[bot]
2.1.0
2.1.0
- Total issues resolved: 0
- Total pull requests resolved: 10
- Total contributors: 2
Dependencies 📦,JSON 👨💼,PHP 🐘
- 30: Require missing safe dependency thanks to @WyriHaximus
- 29: Bump wyrihaximus/async-test-utilities from 3.4.7 to 3.4.8 thanks to @dependabot[bot]
- 27: Bump wyrihaximus/async-test-utilities from 3.4.6 to 3.4.7 thanks to @dependabot[bot]
- 26: Bump wyrihaximus/async-test-utilities from 3.4.5 to 3.4.6 thanks to @dependabot[bot]
- 25: Bump wyrihaximus/async-test-utilities from 3.4.4 to 3.4.5 thanks to @dependabot[bot]
- 24: Bump wyrihaximus/async-test-utilities from 3.4.3 to 3.4.4 thanks to @dependabot[bot]
- 23: Bump wyrihaximus/async-test-utilities from 3.4.2 to 3.4.3 thanks to @dependabot[bot]
- 22: Bump wyrihaximus/async-test-utilities from 3.4.1 to 3.4.2 thanks to @dependabot[bot]
- 21: Bump wyrihaximus/async-test-utilities from 3.4.0 to 3.4.1 thanks to @dependabot[bot]
- 20: Bump wyrihaximus/async-test-utilities from 3.3.3 to 3.4.0 thanks to @dependabot[bot]
2.0.0
Most notable changes:
- Moved everything but the
Cron
class to theCron
namespace - Raised minimum PHP version to 7.4
- All actions now required a TTL to lock the cronjob for
- The high precision scheduler is now the default and only scheduler
- Raised mutex to v2
2.0.0
- Total issues resolved: 0
- Total pull requests resolved: 13
- Total contributors: 2
Documentation 📚,MarkDown 📝
- 19: Add TTL documentation thanks to @WyriHaximus
- 14: Readme update CI badge thanks to @WyriHaximus
- 13: Document Cron::stop() thanks to @WyriHaximus
CI 🚧,Configuration ⚙,YAML 🍄
Dependencies 📦,JSON 👨💼,PHP 🐘,Source 🔮
- 17: Use mutex v2 thanks to @WyriHaximus
PHP 🐘,Source 🔮,Tests 🧪
Dependencies 📦,JSON 👨💼,PHP 🐘
- 15: Update composer scripts thanks to @WyriHaximus
- 12: Bump wyrihaximus/async-test-utilities from 3.3.2 to 3.3.3 thanks to @dependabot[bot]
PHP 🐘,Source 🔮
- 11: Drop SschedulerInterface thanks to @WyriHaximus
Dependencies 📦,JSON 👨💼,PHP 🐘,Source 🔮,Tests 🧪
Documentation 📚,MarkDown 📝,PHP 🐘,Source 🔮,Tests 🧪
- 9: Drop normal scheduler thanks to @WyriHaximus
enhancement
PHP 🐘,Source 🔮,Tests 🧪,enhancement
1.0.0
- Initial release