diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index 573f1a35ca..d236fb7845 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -416,12 +416,12 @@ class StubIntlDateFormatter * * @see http://www.php.net/manual/en/intldateformatter.setlenient.php * - * @throws MethodNotImplementedException When $lenient is true + * @throws MethodArgumentValueNotImplementedException When $lenient is true */ public function setLenient($lenient) { if ($lenient) { - throw new MethodNotImplementedException(__METHOD__); + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'lenient', $lenient, 'Only the strict parser is supported'); } } diff --git a/src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php b/src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php index 446ecc640f..7ec9096891 100644 --- a/src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php +++ b/src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php @@ -906,7 +906,7 @@ class StubIntlDateFormatterTest extends LocaleTestCase } /** - * @expectedException Symfony\Component\Locale\Exception\MethodNotImplementedException + * @expectedException Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedException */ public function testSetLenient() {