Skip to content

Commit 16a3327

Browse files
authored
Merge pull request #154 from Nyholm/interface
Allow a condition to specify an interface and not just classes.
2 parents 6a5cb62 + 366a549 commit 16a3327

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Change Log
22

3-
## 1.7.1 - 2019-12-17
3+
## 1.7.2 - 2019-12-27
4+
5+
### Fixed
6+
7+
- Allow a condition to specify an interface and not just classes.
8+
9+
## 1.7.1 - 2019-12-26
410

511
### Fixed
612

src/ClassDiscovery.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected static function instantiateClass($class)
228228
public static function safeClassExists($class)
229229
{
230230
try {
231-
return class_exists($class);
231+
return class_exists($class) || interface_exists($class);
232232
} catch (\Exception $e) {
233233
return false;
234234
}

0 commit comments

Comments
 (0)