diff --git a/src/Type/Definition/Config.php b/src/Type/Definition/Config.php index 04e9983..997531c 100644 --- a/src/Type/Definition/Config.php +++ b/src/Type/Definition/Config.php @@ -8,6 +8,7 @@ use GraphQL\Utils\Utils; /** * Class Config * @package GraphQL\Type\Definition + * @deprecated See https://github.com/webonyx/graphql-php/issues/148 for alternatives */ class Config { @@ -43,7 +44,10 @@ class Config private static $allowCustomOptions = true; /** + * * Disables config validation + * + * @deprecated See https://github.com/webonyx/graphql-php/issues/148 for alternatives */ public static function disableValidation() { @@ -53,6 +57,8 @@ class Config /** * Enable deep config validation (disabled by default because it creates significant performance overhead). * Useful only at development to catch type definition errors quickly. + * + * @deprecated See https://github.com/webonyx/graphql-php/issues/148 for alternatives */ public static function enableValidation($allowCustomOptions = true) { diff --git a/tests/Type/ConfigTest.php b/tests/Type/ConfigTest.php index 9911174..0d7d645 100644 --- a/tests/Type/ConfigTest.php +++ b/tests/Type/ConfigTest.php @@ -2,6 +2,7 @@ namespace GraphQL\Tests\Type; use GraphQL\Error\InvariantViolation; +use GraphQL\Error\Warning; use GraphQL\Type\Definition\Config; use GraphQL\Type\Definition\EnumType; use GraphQL\Type\Definition\InputObjectType; @@ -14,12 +15,13 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { public function setUp() { - \PHPUnit_Framework_Error_Deprecated::$enabled = false; + Warning::suppress(Warning::CONFIG_DEPRECATION_WARNING); } public static function tearDownAfterClass() { Config::disableValidation(); + Warning::enable(Warning::CONFIG_DEPRECATION_WARNING); } public function testToggling()