Skip to content

Commit

Permalink
Deprecate all static getters on Type
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudk committed Aug 14, 2023
1 parent 0d3ff24 commit fb12480
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Type/Definition/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ abstract class Type implements \JsonSerializable
];

/**
* @deprecated use the `typeRegistry` on the `Schema` instead
*
* @api
*
* @throws InvariantViolation
Expand All @@ -42,6 +44,8 @@ public static function int(): ScalarType
}

/**
* @deprecated use the `typeRegistry` on the `Schema` instead
*
* @api
*
* @throws InvariantViolation
Expand All @@ -52,6 +56,8 @@ public static function float(): ScalarType
}

/**
* @deprecated use the `typeRegistry` on the `Schema` instead
*
* @api
*
* @throws InvariantViolation
Expand All @@ -62,6 +68,8 @@ public static function string(): ScalarType
}

/**
* @deprecated use the `typeRegistry` on the `Schema` instead
*
* @api
*
* @throws InvariantViolation
Expand All @@ -72,6 +80,8 @@ public static function boolean(): ScalarType
}

/**
* @deprecated use the `typeRegistry` on the `Schema` instead
*
* @api
*
* @throws InvariantViolation
Expand Down Expand Up @@ -108,6 +118,8 @@ public static function nonNull($type): NonNull
/**
* Returns all builtin scalar types.
*
* @deprecated use the `typeRegistry` on the `Schema` instead
*
* @throws InvariantViolation
*
* @return array<string, ScalarType>
Expand All @@ -118,7 +130,7 @@ public static function getStandardTypes(): array
}

/**
* @deprecated use a custom instance of `DefaultStandardTypeRegistry` on the `Schema` instead
* @deprecated use the `typeRegistry` on the `Schema` instead
*
* @param array<ScalarType> $types
*
Expand Down

0 comments on commit fb12480

Please sign in to comment.