All Notable changes to cron
will be documented in this file
Next - TBD
Direction
enumExpression::toFields
method which returns the CRON expression fields as an associative array of strings.
Expression::registerAlias
acceptsExpression
objects as possible input for consistency.- [BC Break]
ExpressionField
represents the generic Expression Field abstract class - [BC Break]
Fields
is the enum representing CRON expression field names. - [BC Break]
ExpressionAliasError
renamedAliasError
- [BC Break]
StartDatePresence
enum renamedDatePresence
- [BC Break]
Scheduler::isStartDateExcluded
renamedScheduler::isInitialDateExcluded
- [BC Break]
Scheduler::includeStartDate
renamedScheduler::includeInitialDate
- [BC Break]
Scheduler::excludeStartDate
renamedScheduler::excludeInitialDate
- None
Expression::fields
method, useExpression::toFields
method insteadExpression::toArray
method, replaced byExpression::toFields
method
0.5.1 - 2022-01-11
- None
- Fix
Expression::unregisterAlias
should return a boolean - Fix
alias
normalisation
- None
- None
0.5.0 - 2022-01-11
- Registration mechanism added to
Expression
to allow the package to registered expressions aliases. see #64 Expression::fromFields
acceptsstring
,int
andCronField
objects.Expression::toArray
returns fields as string in an associative array.CronField
VO accepts acceptsstring
,int
as constructor value.- [BC Break]
Expression::fields
returns fields asCronField
objects. - [BC Break]
Expression::__construct
expects CRON Fields asCronField
objects. - [BC Break]
Expression::fromString
expects a CRON Expression. - [BC Break] exposes CRON field via public readonly properties.
- Improve parser range validation the lower bound should always be lower or equal to the upper bound.
- Fix wrap around when steps are higher than the range see for reference #88
- [BC Break] Internal rewrite CRON Fields are now value objects.
- [BC Break]
Expression
field related methods no longer returns string butCronField
object. - [BC Break] All validators are now value object for CRON field expression (ie:
CronFieldValidator
is nowCronField
)
- None
RangeError
exception is removed as it is no longer needed.- [BC Break]
ExpressionParser
its capabilities are now bundle inside theExpression
class. - [BC Break]
CronFieldValidator
capabilities are removed and replaced byCronField
value objects. - [BC Break]
Expression::__toString
, TheExpression
class no longer implements theStringable
interface. - [BC Break]
CronExpression
interface. - [BC Break]
Expression::yearly
,Expression::monthly
,Expression::weekly
,Expression::daily
,Expression::hourly
, named constructors. - [BC Break] Removed
Expression
CRON field getters replaced by public readonly properties.
0.4.0 - 2022-01-03
- None
- Change Character precedence for
,
to allow more CRON expression. see #122 - Improve results when both day of month and day of week are used. see #121
- [BC Break]
ExpressionField::MONTHDAY
is renamedExpressionField::DAY_OF_MONTH
- [BC Break]
ExpressionField::WEEKDAY
is renamedExpressionField::DAY_OF_WEEK
- [BC Break]
SyntaxError
constructor is made private. It can only be accessed via named constructors. Named constructors are revised. - Improve
Scheduler
internal codebase. - [BC Break]
Scheduler::yield*
methods will throw if the$recurrences
value is not a positive integer or0
. - [BC Break]
Scheduler::INCLUDE_START_DATE
andScheduler::EXCLUDE_START_DATE
are replaced by an EnumStartDate
- [BC Break] The
$startDatePresence
property is now required when instantiating theScheduler
class.
- None
- [BC Break]
Scheduler::maxIterationCount
is no longer needed with the new implementation. - [BC Break]
UnableToProcessRun
exception class is no longer needed with the new implementation.
0.3.0 - 2021-12-31
CronScheduler::yieldRunsBefore
to returns runs between a specified end date and an intervalCronScheduler::yieldRunsAfter
to returns runs between a specified start date and an intervalCronScheduler::yieldRunsBetween
to returns runs between specified dates
- [BC Break]
CronFieldValidator::increment
andCronFieldValidator::decrement
accept anyDateTimeInterface
implementing object but will always return aDateTimeImmutable
object. - [BC Break]
CronScheduler::run
,CronScheduler::isDue
,CronScheduler::yieldRunsForward
,CronScheduler::yieldRunsBackward
signature is changed the start date is the first argument and is required
- None
- [BC Break] The not documented public API
FieldValidator::isSatisfied
is removed from public API.
0.2.0 - 2021-12-30
CronFieldValidator::decrement
to allow a field validator to decrement aDateTimeInterface
object if it fails validation.
- [BC Break]
Scheduler
constructor variable$timezone
MUST be provided. If you do not want to supply it use the class named constructors instead. - Internal optimization of
Scheduler::calculateRun
, internally onlyDateTimeImmutable
objects are used instead of theDateTime
class. - If the
$startDate
value is a string, theScheduler
will assume that the value has the same timezone as the underlying system. (Wording fix on theCronScheduler
interface)
- None
CronFieldValidator::increment
no longer has a$invert
boolean argument. It is dropped and aCronFieldValidator::decrement
method is introduced instead.
0.1.0 - 2021-12-29
Initial Release of cron