Properly inject EventDispatched in BackgroundRepair#14805
Conversation
Else it will just be null when called Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
| /** | ||
| * @param EventDispatcherInterface $dispatcher | ||
| */ | ||
| public function setDispatcher(EventDispatcherInterface $dispatcher): void { |
There was a problem hiding this comment.
If this is only executed in tests, why did it work then in the actual code?
There was a problem hiding this comment.
It is then actually needed in line 94. 🤔
There was a problem hiding this comment.
It's only used in
server/lib/private/legacy/app.php
Lines 983 to 985 in 769cb62
There was a problem hiding this comment.
Because
Lines 195 to 198 in e819e97
There was a problem hiding this comment.
But shouldn't then this fail?
Line 80 in e819e97
because there is only a type hint and not an explicit = null. Or is this only causing issues in strict mode?
There was a problem hiding this comment.
Is there already a PR, because I can't find any.
There was a problem hiding this comment.
This is it. We now properly inject it.
There was a problem hiding this comment.
I was referencing the initialization of a new BackgroundRepair instance. But you are right - they are added to the queue and the queue then uses the DI container. Sorry for the noise.
|
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 17256: failureTESTS=acceptance, TESTS-ACCEPTANCE=app-files-sharing-link
Show full log |

Else it will just be null when called
Signed-off-by: Roeland Jago Douma roeland@famdouma.nl