[Flow] Unresolved dependency in TYPO3\SwiftMailer\Mailer
toco at aimeos.org
toco at aimeos.org
Fri Feb 20 16:24:07 CET 2015
Christian Loock schrieb am 20.02.2015 15:45:
> Have your tried requesting the Interface instead?
>
> $this->objectManager->get('TYPO3\\SwiftMailer\\MailerInterface');
Yes, but that only leads to another error:
TYPO3\Flow\Object\Exception\UnknownObjectException
Message
Object "\TYPO3\SwiftMailer\MailerInterface" is not registered. Hint: You
specified an object name with a leading backslash!
> This is just a wild guess, but since the configuration is made for the
> interface, it would make sense. Also, you might consider using property
> injection instead with @Inject . This definitly works with Interfaces,
> not sure about direct calls on the OM.
You are right, when using property injection it works while the object manager fails in these cases:
/**
* @var \TYPO3\SwiftMailer\MailerInterface
* @Flow\Inject
*/
protected $mailer;
Thanks a lot!
Toco
More information about the Flow
mailing list