Skip to content

Commit 26396aa

Browse files
committed
made the esception messages consistent across the board
1 parent 971b994 commit 26396aa

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

Constraints/Bic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Bic extends Constraint
4848
public function __construct($options = null)
4949
{
5050
if (!class_exists(Countries::class)) {
51-
// throw new LogicException(sprintf('The "symfony/intl" component is required to use the "%s" constraint.', __CLASS__));
51+
// throw new LogicException('The Intl component is required to use the Bic constraint. Try running "composer require symfony/intl".');
5252
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
5353
}
5454

Constraints/BicValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function validate($value, Constraint $constraint)
109109
$validCountryCode = Countries::exists(substr($canonicalize, 4, 2));
110110
} else {
111111
$validCountryCode = ctype_alpha(substr($canonicalize, 4, 2));
112-
// throw new LogicException('The "symfony/intl" component is required to use the Bic constraint.');
112+
// throw new LogicException('The Intl component is required to use the Bic constraint. Try running "composer require symfony/intl".');
113113
}
114114

115115
if (!$validCountryCode) {

Constraints/Country.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Country extends Constraint
3434
public function __construct($options = null)
3535
{
3636
if (!class_exists(Countries::class)) {
37-
// throw new LogicException(sprintf('The "symfony/intl" component is required to use the "%s" constraint.', __CLASS__));
37+
// throw new LogicException('The Intl component is required to use the Country constraint. Try running "composer require symfony/intl".');
3838
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
3939
}
4040

Constraints/CountryValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function validate($value, Constraint $constraint)
4343
}
4444

4545
if (!class_exists(Countries::class)) {
46-
throw new LogicException('The "symfony/intl" component is required to use the Country constraint.');
46+
throw new LogicException('The Intl component is required to use the Country constraint. Try running "composer require symfony/intl".');
4747
}
4848

4949
$value = (string) $value;

Constraints/Currency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Currency extends Constraint
3535
public function __construct($options = null)
3636
{
3737
if (!class_exists(Currencies::class)) {
38-
// throw new LogicException(sprintf('The "symfony/intl" component is required to use the "%s" constraint.', __CLASS__));
38+
// throw new LogicException('The Intl component is required to use the Currency constraint. Try running "composer require symfony/intl".');
3939
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
4040
}
4141

Constraints/CurrencyValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function validate($value, Constraint $constraint)
4444
}
4545

4646
if (!class_exists(Currencies::class)) {
47-
throw new LogicException('The "symfony/intl" component is required to use the Currency constraint.');
47+
throw new LogicException('The Intl component is required to use the Currency constraint. Try running "composer require symfony/intl".');
4848
}
4949

5050
$value = (string) $value;

Constraints/Language.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Language extends Constraint
3434
public function __construct($options = null)
3535
{
3636
if (!class_exists(Languages::class)) {
37-
// throw new LogicException(sprintf('The "symfony/intl" component is required to use the "%s" constraint.', __CLASS__));
37+
// throw new LogicException('The Intl component is required to use the Language constraint. Try running "composer require symfony/intl".');
3838
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
3939
}
4040

Constraints/LanguageValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function validate($value, Constraint $constraint)
4343
}
4444

4545
if (!class_exists(Languages::class)) {
46-
throw new LogicException('The "symfony/intl" component is required to use the Language constraint.');
46+
throw new LogicException('The Intl component is required to use the Language constraint. Try running "composer require symfony/intl".');
4747
}
4848

4949
$value = (string) $value;

Constraints/Locale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct($options = null)
3939
}
4040

4141
if (!class_exists(Locales::class)) {
42-
// throw new LogicException(sprintf('The "symfony/intl" component is required to use the "%s" constraint.', __CLASS__));
42+
// throw new LogicException('The Intl component is required to use the Locale constraint. Try running "composer require symfony/intl".');
4343
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
4444
}
4545

Constraints/LocaleValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function validate($value, Constraint $constraint)
4343
}
4444

4545
if (!class_exists(Locales::class)) {
46-
throw new LogicException('The "symfony/intl" component is required to use the Locale constraint.');
46+
throw new LogicException('The Intl component is required to use the Locale constraint. Try running "composer require symfony/intl".');
4747
}
4848

4949
$inputValue = (string) $value;

0 commit comments

Comments
 (0)