Skip to content

Commit

Permalink
Also detect interfaces in getImplementationFromResourceConfiguration()
Browse files Browse the repository at this point in the history
  • Loading branch information
cundd committed May 13, 2019
1 parent fab4139 commit 1f58306
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/ObjectManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Psr\Container\ContainerInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager as TYPO3ObjectManager;
use function interface_exists;

/**
* Specialized Object Manager
Expand Down Expand Up @@ -247,7 +248,7 @@ private function getImplementationFromResourceConfiguration(ResourceType $resour
return null;
}

if (!class_exists($implementation)) {
if (!class_exists($implementation) && !interface_exists($implementation)) {
throw new InvalidConfigurationException(
sprintf('Configured %s "%s" does not exist', $type, $implementation)
);
Expand Down

0 comments on commit 1f58306

Please sign in to comment.