MAJOR CHANGE - In previous versions of this library, setting both a "Day of Month" and a "Day of Week" would be interpreted as an AND
statement, not an OR
statement. For example:
30 0 1 * 1
would evaluate to "Run 30 minutes after the 0 hour when the Day Of Month is 1 AND a Monday" instead of "Run 30 minutes after the 0 hour on Day Of Month 1 OR a Monday", where the latter is more inline with most cron systems. This means that if your cron expression has both of these fields set, you may see your expression fire more often starting with v3.0.0.
- Additional docblocks for IDE and documentation
- Added phpstan as a development dependency
- Added a
Cron\FieldFactoryInterface
to make migrations easier (#38)
- Changed some DI testing during TravisCI runs
\Cron\CronExpression::determineTimezone()
now checks for\DateTimeInterface
instead of just\DateTime
- Errors with fields now report a more human-understandable error and are 1-based instead of 0-based
- Better support for
\DateTimeImmutable
across the library by typehinting for\DateTimeInterface
now - Literals should now be less case-sensative across the board
- Changed logic for when both a Day of Week and a Day of Month are supplied to now be an OR statement, not an AND
- Fixed infinite loop when determining last day of week from literals
- Fixed bug where single number ranges were allowed (ex:
1/10
) - Fixed nullable FieldFactory in CronExpression where no factory could be supplied
- Fixed issue where logic for dropping seconds to 0 could lead to a timezone change
- Added support for DateTimeImmutable via DateTimeInterface
- Added support for PHP 7.3
- Started listing projects that use the library
- Errors should now report a human readable position in the cron expression, instead of starting at 0
- N/A
- Added support for steps larger than field ranges (#6)
- N/A
- Fixed validation for numbers with leading 0s (#12)
- N/A
- Upgraded to PHPUnit 6 (#2)
- Refactored timezones to deal with some inconsistent behavior (#3)
- Allow ranges and lists in same expression (#5)
- Fixed regression where literals were not converted to their numerical counterpart (#)
- N/A
- Dropped support for PHP 5.x
- Dropped support for the YEAR field, as it was not part of the cron standard
- Reworked validation for all the field types
- Stepping should now work for 1-indexed fields like Month (#153)
- Added IDE, CodeSniffer, and StyleCI.IO support
- Switched to PSR-4 Autoloading
- 0 step expressions are handled better
- Fixed
DayOfMonth
validation to be more strict - Typos
- Support for non-hourly offset timezones
- Checks for valid expressions
- Max Iterations no longer hardcoded for
getRunDate()
- Supports DateTimeImmutable for newer PHP verions
- Fixed looping bug for PHP 7 when determining the last specified weekday of a month
- Now supports expressions with any number of extra spaces, tabs, or newlines
- Using static instead of self in
CronExpression::factory