Skip to content

Commit

Permalink
Merge pull request #19 from awd-studio/updates
Browse files Browse the repository at this point in the history
#18 Added a check for the MessageIdResolver to discover existing interfaces
  • Loading branch information
awd-studio committed Jul 22, 2020
2 parents e3b7318 + 7b4163a commit d3e2487
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ parameters:
- 'symfony'
- 'php70'
- 'php71'

skip:
SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff:
- 'tests/*'
2 changes: 1 addition & 1 deletion src/Bus/Reader/ReflectionMessageIdReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function read(\ReflectionFunctionAbstract $callback): string
}

$messageId = $messageType->getName();
if (false === \class_exists($messageId)) {
if (false === \class_exists($messageId) && false === \interface_exists($messageId)) {
throw new ParsingException('A message ID must represent an existing class');
}

Expand Down

0 comments on commit d3e2487

Please sign in to comment.