Closed tqmz closed 9 years ago
In v1.0.3 it was possible to assign multiple days of week to an DayOfWeekField expression with a week of month:
DayOfWeekField
$this->assertTrue($f->validate('MON#1,MON#3'));
In master, this doesn't validate anymore while it seems to be supported in terms of isDue().
isDue()
PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid CRON field value MON#1,MON#3 as position 4' in /home/t/dev/fs/radiorecorder/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php:123 Stack trace: #0 /home/t/dev/fs/radiorecorder/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(105): Cron\CronExpression->setPart(4, 'MON#1,MON#3') #1 /home/t/dev/fs/radiorecorder/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(84): Cron\CronExpression->setExpression('00 14 * * MON#1...') #2 /home/t/dev/fs/radiorecorder/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(72): Cron\CronExpression->__construct('00 14 * * MON#1...', Object(Cron\FieldFactory)) #3 /home/t/dev/fs/radiorecorder/record.php(167): Cron\CronExpression::factory('00 14 * * MON#1...') #4 /home/t/dev/fs/radiorecorder/record.php(45): Radiorecorder\Radiorecorder->parseBroadcasts('/home/t/dev/fs/...') #5 /home/t/dev/fs/radiorecorder/record.php(382): Radiorecorder\Radiorecorder->__construct() #6 {main} th in /home/t/dev/fs/radiorecorder/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php on line 123
Is that just a matter of fixing the regex in DayOfWeekField::validate(), or for some reason an undesired expression?
DayOfWeekField::validate()
In v1.0.3 it was possible to assign multiple days of week to an
DayOfWeekField
expression with a week of month:In master, this doesn't validate anymore while it seems to be supported in terms of
isDue()
.Is that just a matter of fixing the regex in
DayOfWeekField::validate()
, or for some reason an undesired expression?