Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function checkRequirements($id, array $tag)
{
parent::checkRequirements($id, $tag);

if (!isset($tag['method']) || !is_string($tag['method'])) {
if (isset($tag['method']) && !is_string($tag['method'])) {
throw new \InvalidArgumentException(
sprintf('Service tagged "%s" must have valid "method" argument.', $id)
);
Expand Down
2 changes: 1 addition & 1 deletion Resolver/AbstractProxyResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function resolve($input)
}

$options = $this->getSolutionOptions($alias);
$func = [$solution, $options['method']];
$func = isset($options['method']) ? [$solution, $options['method']] : $solution;

return call_user_func_array($func, $funcArgs);
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/app/Exception/ExampleException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class ExampleException
{
public function throwException()
public function __invoke()
{
throw new \InvalidArgumentException('Invalid argument exception');
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/app/config/exception/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ services:
overblog_graphql.test.exception:
class: Overblog\GraphQLBundle\Tests\Functional\app\Exception\ExampleException
tags:
- { name: "overblog_graphql.resolver", alias: "example_exception", method: "throwException" }
- { name: "overblog_graphql.resolver", alias: "example_exception" }