Closed tgriessbach closed 1 year ago
Hi,
please don't use github issues for support questions to keep the issue board as small as possible. Slack or Stackoverflow would be the best location for this. I'm not a DI pro yet so I have no quick answer for you (except using GeneralUtitlity::makeInstance()).
Thx, Alex
@tgriessbach We do have a similar problem. Could you resolve your problem it?
Hi @runepiper , sorry because the ticket was closed I didn't see your reply.
We used the DataProcessor to add data to emails.
So we could resolve the problem by moving the logic from the DataProcessor to a PowermailSendMailSignal that is connected to the createEmailBodyBeforeRender
slot. There the __construct
injection works.
Hi, we have a problem after updating an older system to this:
We used a DataProcessor that extends In2code\Powermail\DataProcessor\AbstractDataProcessor and we used Constructor injection to get a repository in there. In TYPO3 10 with PHP 7 that worked fine.
But it does not work anymore because it is not possible now to override a
__construct()
with different arguments.Now we tried Method injection like here: https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/DependencyInjection/Index.html#method-injection
But for that you have to set
autowire: true
and that collides with the__construct()
again:Do you have any tips for us how to get DependencyInjection working for this DataProcessor?