Commit 7dfbe88c authored by Mat's avatar Mat

fix sf3 depreciated addViolationAt() method

cfr vendor/symfony/symfony/UPGRADE-3.0.md:1719
parent 42e33c02
......@@ -224,9 +224,9 @@ class AccompanyingPeriod
}
if (! $this->isClosingAfterOpening()) {
$context->addViolationAt('dateClosing',
'The date of closing is before the date of opening',
array(), null);
$context->buildViolation('The date of closing is before the date of opening')
->atPath('dateClosing')
->addViolation();
}
}
......
......@@ -735,15 +735,15 @@ class Person implements HasCenterInterface {
if ($r !== true) {
if ($r['result'] === self::ERROR_PERIODS_ARE_COLLAPSING) {
$context->addViolationAt('accompanyingPeriods',
'Two accompanying periods have days in commun',
array());
$context->buildViolation('Two accompanying periods have days in commun')
->atPath('accompanyingPeriods')
->addViolation();
}
if ($r['result'] === self::ERROR_ADDIND_PERIOD_AFTER_AN_OPEN_PERIOD) {
$context->addViolationAt('accompanyingPeriods',
'A period is opened and a period is added after it',
array());
$context->buildViolation('A period is opened and a period is added after it')
->atPath('accompanyingPeriods')
->addViolation();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment