Skip to content

Releases: dragonmantank/cron-expression

v3.1.0

24 Nov 20:05
7a8c6e5
Compare
Choose a tag to compare

[3.1.0] - 2020-11-24

Added

  • Added CronExpression::getParts() method to get parts of the expression as an array (#83)

Changed

  • Changed to Interfaces for some type hints (#97, #86)
  • Dropped minimum PHP version to 7.2
  • Few syntax changes for phpstan compatibility (#93)

Fixed

  • N/A

Deprecated

  • Deprecated CronExpression::factory in favor of the constructor (#56)
  • Deprecated CronExpression::YEAR as a formality, the functionality is already removed (#87)

v3.0.2

13 Oct 01:34
48212cd
Compare
Choose a tag to compare

[3.0.2] - 2020-10-12

Added

  • Added support for PHP 8 (#92)

Changed

  • N/A

Fixed

  • N/A

v2.3.1

13 Oct 00:59
65b2d8e
Compare
Choose a tag to compare

[2.3.1] - 2020-10-12

Added

  • Added support for PHP 8 (#92)

Changed

  • N/A

Fixed

  • N/A

v3.0.1

21 Aug 02:59
fa4e95f
Compare
Choose a tag to compare

Fixed

  • Cast step to an int as part of calling range(), see #80
  • Added missing check for ? in DOM and DOW, see #76

v3.0.0

25 Mar 18:46
70c187e
Compare
Choose a tag to compare

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.

Added

  • Additional docblocks for IDE and documentation
  • Added phpstan as a development dependency
  • Added a Cron\FieldFactoryInterface to make migrations easier (#38)

Changed

  • 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

  • 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