-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
63 additions
and
22 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
src/DependencyInjection/Compiler/ResolverTaggedServiceMappingPass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Overblog\GraphQLBundle\DependencyInjection\Compiler; | ||
|
||
use InvalidArgumentException; | ||
use function is_string; | ||
use function sprintf; | ||
|
||
/** | ||
* TODO: remove this class in 1.0 | ||
* | ||
* @deprecated This class is deprecated since 0.14 in favor of QueryTaggedServiceMappingPass | ||
*/ | ||
class ResolverTaggedServiceMappingPass extends TaggedServiceMappingPass | ||
{ | ||
protected function getTagName(): string | ||
{ | ||
return 'overblog_graphql.resolver'; | ||
} | ||
|
||
protected function checkRequirements(string $id, array $tag): void | ||
{ | ||
parent::checkRequirements($id, $tag); | ||
|
||
if (isset($tag['method']) && !is_string($tag['method'])) { | ||
throw new InvalidArgumentException( | ||
sprintf('Service tagged "%s" must have valid "method" argument.', $id) | ||
); | ||
} | ||
} | ||
|
||
protected function getResolverServiceID(): string | ||
{ | ||
return 'overblog_graphql.query_resolver'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters