-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Both IndexEntity & RemoveEntity messages are handled #67
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #67 +/- ##
============================================
- Coverage 33.36% 33.33% -0.04%
- Complexity 648 649 +1
============================================
Files 123 123
Lines 2161 2163 +2
============================================
Hits 721 721
- Misses 1440 1442 +2 ☔ View full report in Codecov by Sentry. |
I propose to not have the |
Ok for this! |
will you try and fix it or should I? :) |
I try to fix it today! |
Great, thanks :D |
4f7da24
to
68079c6
Compare
@loevgaard i add an I notice another issue (in the master branch) with |
@@ -22,7 +22,7 @@ public function __construct(ManagerRegistry $managerRegistry, private readonly I | |||
$this->managerRegistry = $managerRegistry; | |||
} | |||
|
|||
public function __invoke(RemoveEntity|IndexEntity $message): void | |||
protected function handle(RemoveEntity|IndexEntity $message): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected function handle(RemoveEntity|IndexEntity $message): void | |
protected function handle(RemoveEntity|IndexEntity $message, callable $action): void |
I think I would change the signature to this and add the callback in the concrete handler like:
$this->handle($message, fn(Index $index) => $index->indexer()->removeEntity($entity););
Wdyt?
68079c6
to
a7c27df
Compare
Great work, @SebLours 🎉 |
Fix #66