Skip to content

Commit

Permalink
Add proper deprecation calls
Browse files Browse the repository at this point in the history
  • Loading branch information
murtukov committed Jan 20, 2021
1 parent 7923316 commit 9a1c272
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Definition/Resolver/ResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@

namespace Overblog\GraphQLBundle\Definition\Resolver;

use function sprintf;
use function trigger_error;
use const E_USER_DEPRECATED;

@trigger_error(sprintf('The "%s" interface is deprecated since 0.14 and will be removed in 1.0. Use "%s" instead', ResolverInterface::class, QueryInterface::class), E_USER_DEPRECATED);

/**
* @deprecated This interface is deprecated since 0.14 and will be removed in 1.0. Use Overblog\GraphQLBundle\Definition\Resolver\QueryInterface instead.
* @deprecated since 0.14 and will be removed in 1.0. Use Overblog\GraphQLBundle\Definition\Resolver\QueryInterface instead.
* @codeCoverageIgnore
*/
interface ResolverInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
use InvalidArgumentException;
use function is_string;
use function sprintf;
use function trigger_error;
use const E_USER_DEPRECATED;

@trigger_error(sprintf('The "%s" class is deprecated since 0.14 and will be removed in 1.0. Use "%s" instead.', ResolverTaggedServiceMappingPass::class, QueryTaggedServiceMappingPass::class), E_USER_DEPRECATED);

/**
* TODO: remove this class in 1.0
*
* @deprecated This class is deprecated since 0.14 in favor of QueryTaggedServiceMappingPass and will be removed in 1.0.
* @deprecated since 0.14 and will be removed in 1.0. Use Overblog\GraphQLBundle\DependencyInjection\Compiler\QueryTaggedServiceMappingPass instead.
* @codeCoverageIgnore
*/
class ResolverTaggedServiceMappingPass extends TaggedServiceMappingPass
Expand Down

0 comments on commit 9a1c272

Please sign in to comment.