Removed deprecated error classes and added class_alias for them instead in deprecated.php

This commit is contained in:
vladar 2016-11-25 16:03:04 +07:00
parent 3d4cd15678
commit 018ac819cf
4 changed files with 4 additions and 50 deletions

View File

@ -1,18 +0,0 @@
<?php
namespace GraphQL;
trigger_error(
'GraphQL\Error was moved to GraphQL\Error\Error and will be deleted on next release',
E_USER_DEPRECATED
);
/**
* Class Error
*
* @deprecated since 2016-10-21 in favor of GraphQL\Error\Error
* @package GraphQL
*/
class Error extends \GraphQL\Error\Error
{
}

View File

@ -1,16 +0,0 @@
<?php
namespace GraphQL;
trigger_error(
'GraphQL\FormattedError was moved to GraphQL\Error\FormattedError and will be deleted on next release',
E_USER_DEPRECATED
);
/**
* Class FormattedError
* @deprecated since 2016-10-21 in favor of GraphQL\Error\FormattedError
* @package GraphQL
*/
class FormattedError extends \GraphQL\Error\FormattedError
{
}

View File

@ -1,16 +0,0 @@
<?php
namespace GraphQL;
trigger_error(
'GraphQL\SyntaxError was moved to GraphQL\Error\SyntaxError and will be deleted on next release',
E_USER_DEPRECATED
);
/**
* Class SyntaxError
* @deprecated since 2016-10-21 in favor of GraphQL\Error\SyntaxError
* @package GraphQL
*/
class SyntaxError extends \GraphQL\Error\SyntaxError
{
}

View File

@ -4,6 +4,10 @@ if (defined('GRAPHQL_WITH_DEPRECATED') && !GRAPHQL_WITH_DEPRECATED) {
}
// Renamed as of 8.0:
class_alias('GraphQL\Error\Error', 'GraphQL\Error');
class_alias('GraphQL\Error\FormattedError', 'GraphQL\FormattedError');
class_alias('GraphQL\Error\SyntaxError', 'GraphQL\SyntaxError');
class_alias('GraphQL\Language\AST\ArgumentNode', 'GraphQL\Language\AST\Argument');
class_alias('GraphQL\Language\AST\BooleanValueNode', 'GraphQL\Language\AST\BooleanValue');
class_alias('GraphQL\Language\AST\DefinitionNode', 'GraphQL\Language\AST\Definition');