Skip to content

Commit 5ed48de

Browse files
authored
Merge pull request #172 from j-guyon/switch-cron-expresion-deps
Switch to dragonmantank/cron-expression 3.0
2 parents 8a89fb9 + d36e3d2 commit 5ed48de

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

Tests/Constraints/CronExpressionValidatorTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public function getValidValues()
3333
['@daily'],
3434
['@yearly'],
3535
['*/10 * * * *'],
36-
['* * * * * *'], // Remove this value from valid options at 3.0 release.
3736
];
3837
}
3938

@@ -62,9 +61,8 @@ public function getInvalidValues()
6261
['sometimes'],
6362
['never'],
6463
['*****'],
65-
// Uncomment following values at 3.0 release.
66-
// array('* * * * * * *'),
67-
// array('* * * * * *'),
64+
['* * * * * * *'],
65+
['* * * * * *'],
6866
];
6967
}
7068
}

Validator/Constraints/CronExpressionValidator.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ public function validate($value, Constraint $constraint)
2828
try {
2929
CronExpressionLib::factory($value);
3030
} catch (\InvalidArgumentException $e) {
31-
// This condition is required in order to respect BC with "mtdowling/cron-expression".
32-
// It must be removed at 3.0 release.
33-
// @see https://github.com/mtdowling/cron-expression/commit/56e89730e60a0e945bf4ea10c48b80a406c7e7a0.
34-
if ('6 is not a valid position' === $e->getMessage()) {
35-
@trigger_error($e->getMessage().' and its support is deprecated since jmose/command-scheduler-bundle 2.x.', E_USER_DEPRECATED);
36-
37-
return;
38-
}
39-
4031
$this->context->addViolation($constraint->message, [], $value);
4132
}
4233
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"symfony/console": "^3.4|^4.3|^5.0",
1717
"doctrine/orm": "^2.5.11",
1818
"doctrine/doctrine-bundle": "^1.6.10|^2.0",
19-
"mtdowling/cron-expression": "^1.2",
19+
"dragonmantank/cron-expression": "^3.0",
2020
"symfony/framework-bundle": "^3.4|^4.3|^5.0",
2121
"symfony/twig-bundle": "^3.4|^4.3|^5.0",
2222
"symfony/translation": "^3.4|^4.3|^5.0",

0 commit comments

Comments
 (0)