diff --git a/.travis.yml b/.travis.yml index 6d2d4e2..e4f850e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,11 @@ language: php php: - - '5.6' - - '7.0' - '7.1' - '7.2' - hhvm matrix: allow_failures: - - php: 5.6 - php: hhvm fast_finish: true diff --git a/README.md b/README.md index 422895e..4e6f8b3 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,13 @@ or add the package to your `composer.json` ```json { "require": { - "peppeocchi/php-cron-scheduler": "2.*" + "peppeocchi/php-cron-scheduler": "3.*" } } ``` +Scheduler V3 requires php >= 7.1, please use the [v2 branch](https://github.com/peppeocchi/php-cron-scheduler/tree/v2.x) for php versions < 7.1. + ## How it works Create a `scheduler.php` file in the root your project with the following content. @@ -125,7 +127,7 @@ $scheduler->call( There are a few methods to help you set the execution time of your schedules. If you don't call any of this method, the job will run every minute (* * * * *). -- `at` - This method accepts any expression supported by [mtdowling/cron-expression](https://github.com/mtdowling/cron-expression) +- `at` - This method accepts any expression supported by [dragonmantank/cron-expression](https://github.com/dragonmantank/cron-expression) ```php $scheduler->php('script.php')->at('* * * * *'); ``` diff --git a/composer.json b/composer.json index d8a6cd5..4d757ee 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,8 @@ ], "minimum-stability": "dev", "require": { - "php": ">=5.5.9", - "mtdowling/cron-expression": "~1.0" + "php": "^7.1", + "dragonmantank/cron-expression": "^2.3" }, "require-dev": { "phpunit/phpunit": "~5.7", diff --git a/src/GO/Traits/Interval.php b/src/GO/Traits/Interval.php index cb435a5..c80a4d9 100644 --- a/src/GO/Traits/Interval.php +++ b/src/GO/Traits/Interval.php @@ -413,6 +413,6 @@ private function validateCronRange($value, $min, $max) ); } - return $value; + return (int) $value; } }