nextcloud / nextcloud/files_fulltextsearch
Using dispatchTyped and changed event names broke dependent app integrations
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 72
- Forks
- 41
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 9
Description
I have an app integration that is dependent on files_fulltextsearch. I hook into the EventDispatcher and listen for specific events. It has been a while since I upgraded my app (along with upgrading files_fulltextsearch), but in attempting to do so I noticed that all the events stopped working. I noticed that this app (files_fulltextsearch_tesseract) is having the same issues I am.
I did some digging and noticed that files_fulltextsearch was still calling $this->dispatch in the lib/Service/ExtensionService.php file. But the dispatch function was changed to call $this->eventDispatcher->dispatchTyped in this commit: https://github.com/nextcloud/files_fulltextsearch/commit/df0ec1161893fc1c4a7b4bdcc677af7d7caf21d2#diff-966d10a7ed8f3b02fa5f56cb2ad73d79b5a4cb1d947f6817a389e40c3f6569cdR123
When I print out the names of these new versions of the events, I get OCP\EventDispatcher\GenericEvent instead of the expected event names.
I believe this means that all apps that are dependent on these events are currently broken or they've figured out they have to listen to the event OCP\EventDispatcher\GenericEvent and figure out how to handle the various arguments coming through.
I think the fix is to go back to using $this->eventDispatcher->dispatch on the line I linked to above. Then the dependent apps can switch to the new event names and they will start working again.
I'm happy to submit a PR to fix it if that is desired.
Affected files:
lib/Service/ExtensionService.php
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading lib/Service/ExtensionService.php, especially the event dispatch call linked in the issue, and compare the effects of dispatchTyped with dispatch. Verify which event names dependent integrations receive. Done means the existing dependent apps can listen for their expected event names again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100