in2code-de / luxletter

Newsletter system for TYPO3
https://www.in2code.de/agentur/typo3-extensions/luxletter/
22 stars 25 forks source link

Stop using GeneralUtility::makeInstance everywhere #214

Closed georgringer closed 5 months ago

georgringer commented 5 months ago

Please stop using GeneralUtility::makeInstance() everywhere! It is only needed if

Please don't use for stuff like creating basic objections, especially not:

einpraegsam commented 5 months ago

Thx for your hints. Any real problems or simply a small rant?

einpraegsam commented 5 months ago

I guess not. I will consider using more DI even if this is often a pain. Nevertheless, there is nothing to do for the moment. It is more a general task.

georgringer commented 5 months ago

it is not a rant, but saw it because phpstorm told me about some warnings

Bildschirmfoto 2024-03-06 um 15 42 57

and it is smaller to read

        $event = $this->eventDispatcher->dispatch(
            new NewsletterParseSubjectEvent($subject, $properties)
        );