Skip to content

Commit

Permalink
Deprecate all exception classes
Browse files Browse the repository at this point in the history
It won't be possible to catch specific exceptions; users will need to
catch `ValidationException`. The `NestedValidationException` will be
removed in the next major version, but there's no alternative to it
right now, so I didn't deprecate it.
  • Loading branch information
henriquemoody committed Jan 6, 2025
1 parent 5722393 commit 8f6d986
Show file tree
Hide file tree
Showing 152 changed files with 154 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/Exceptions/AllOfException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see NestedValidationException} instead.
*/
class AllOfException extends GroupedValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/AlnumException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class AlnumException extends FilteredValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/AlphaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class AlphaException extends FilteredValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/AlwaysInvalidException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class AlwaysInvalidException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/AlwaysValidException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class AlwaysValidException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/AnyOfException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class AnyOfException extends NestedValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ArrayTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @author Emmerson Siqueira <[email protected]>
* @author Henrique Moody <[email protected]>
* @author João Torquato <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ArrayTypeException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ArrayValException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Emmerson Siqueira <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ArrayValException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/AttributeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Emmerson Siqueira <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class AttributeException extends NestedValidationException implements NonOmissibleException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/Base64Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author Jens Segers <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class Base64Exception extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/BaseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Carlos André Ferrari <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class BaseException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/BetweenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class BetweenException extends NestedValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/BoolTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*
* @author Devin Torres <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class BoolTypeException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/BoolValException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Emmerson Siqueira <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class BoolValException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/BsnException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author Ronald Drenth <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class BsnException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CallException extends NestedValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CallableTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Exception class for CallableType rule.
*
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CallableTypeException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CallbackException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CallbackException extends NestedValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CharsetException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CharsetException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CnhException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author Kinn Coelho Julião <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CnhException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CnpjException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author Leonn Leite <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CnpjException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ConsonantException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author Danilo Correa <[email protected]>
* @author Kleber Hamada Sato <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ConsonantException extends FilteredValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ContainsAnyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @author Kirill Dlussky <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ContainsAnyException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ContainsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ContainsException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ControlException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Andre Ramaciotti <[email protected]>
* @author Danilo Correa <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ControlException extends FilteredValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CountableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author João Torquato <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CountableException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CountryCodeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CountryCodeException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CpfException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author Jair Henrique <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CpfException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CreditCardException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Henrique Moody <[email protected]>
* @author Jean Pimentel <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CreditCardException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/CurrencyCodeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Henrique Moody <[email protected]>
* @author Justin Hook <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class CurrencyCodeException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/DateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Bruno Luiz da Silva <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class DateException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/DateTimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class DateTimeException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/DecimalException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class DecimalException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/DigitException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class DigitException extends FilteredValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/DirectoryException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class DirectoryException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/DomainException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class DomainException extends NestedValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/EachException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class EachException extends NestedValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/EmailException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* @author Eduardo Gulias Davis <[email protected]>
* @author Henrique Moody <[email protected]>
* @author Paul Karikari <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class EmailException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/EndsWithException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class EndsWithException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/EqualsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Alexandre Gomes Gaigalas <[email protected]>
* @author Henrique Moody <[email protected]>
* @author Ian Nisbet <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class EqualsException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/EquivalentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class EquivalentException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/EvenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Henrique Moody <[email protected]>
* @author Jean Pimentel <[email protected]>
* @author Paul Karikari <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class EvenException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ExecutableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ExecutableException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ExistsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Henrique Moody <[email protected]>
* @author William Espindola <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ExistsException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/ExtensionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*
* @author Danilo Correa <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class ExtensionException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/FactorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Danilo Correa <[email protected]>
* @author David Meister <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class FactorException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/FalseValException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Danilo Correa <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class FalseValException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/FibonacciException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Danilo Correa <[email protected]>
* @author Henrique Moody <[email protected]>
* @author Samuel Heinzmann <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class FibonacciException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/FileException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @author Danilo Correa <[email protected]>
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class FileException extends ValidationException
{
Expand Down
1 change: 1 addition & 0 deletions library/Exceptions/FilterVarException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @author Henrique Moody <[email protected]>
* @deprecated Using rule exceptions directly is deprecated, and will be removed in the next major version. Please use {@see ValidationException} instead.
*/
final class FilterVarException extends ValidationException
{
Expand Down
Loading

0 comments on commit 8f6d986

Please sign in to comment.