-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Emit event when running ./occ db:add-missing-indices #9576
Conversation
/** | ||
* @param IDBConnection $connection | ||
*/ | ||
public function __construct(IDBConnection $connection) { | ||
public function __construct(IDBConnection $connection, EventDispatcherInterface $dispatcher) { |
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.
You're missing the assignment of $dispatcher
to the private field.
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.
look again
0830a8f
to
91ec554
Compare
Codecov Report
@@ Coverage Diff @@
## master #9576 +/- ##
=============================================
+ Coverage 29.13% 51.18% +22.04%
Complexity 25673 25673
=============================================
Files 1568 1568
Lines 87950 87953 +3
=============================================
+ Hits 25623 45015 +19392
+ Misses 62327 42938 -19389
|
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.
Works 👍
Retriggered CI job |
lib/public/IDBConnection.php
Outdated
@@ -45,6 +45,9 @@ | |||
* @since 6.0.0 | |||
*/ | |||
interface IDBConnection { | |||
|
|||
const ADD_MISSING_INDEXES_EVENT = this::class . '::ADD_MISSING_INDEXES'; |
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.
lib/public/IDBConnection.php:49 PhanUndeclaredClassConstant Reference to constant class from undeclared class \OCP\this
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.
I fixed it by replacing the this
with self
😉
This allows apps to listen to this event in order to also update indecies there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
91ec554
to
80cc8d0
Compare
Would a backport make sense? it is a small change but then apps can already add indexes for 13 apps. |
I would say so. |
backport in #9620 |
This allows apps to listen to this event in order to also update
indecies there.
Signed-off-by: Roeland Jago Douma roeland@famdouma.nl