Skip to content

Refactor events controllers - #20533

Open
kamil-tekiela wants to merge 15 commits into
phpmyadmin:masterfrom
kamil-tekiela:Refactor-Events-controllers
Open

kamil-tekiela wants to merge 15 commits into
phpmyadmin:masterfrom
kamil-tekiela:Refactor-Events-controllers

Conversation

@kamil-tekiela

Copy link
Copy Markdown
Contributor

Fixes some bugs and simplifies the controller. I need to do the same thing in the other two controllers but as they are slightly different, I've decided to handle it separately.

This PR needs to be squashed before commit, but to make it somewhat easier to review, I didn't squash it yet.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.58389% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.39%. Comparing base (2e0eb32) to head (aef2ea6).

Files with missing lines Patch % Lines
src/Events/Events.php 41.09% 43 Missing ⚠️
src/Controllers/Events/IndexController.php 38.00% 31 Missing ⚠️
src/Database/Routines.php 10.00% 9 Missing ⚠️
src/Triggers/Triggers.php 0.00% 8 Missing ⚠️
src/Controllers/Database/RoutinesController.php 50.00% 1 Missing ⚠️
src/Controllers/Triggers/IndexController.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20533      +/-   ##
============================================
+ Coverage     64.30%   64.39%   +0.08%     
+ Complexity    16093    16085       -8     
============================================
  Files           679      679              
  Lines         57826    57759      -67     
============================================
+ Hits          37184    37192       +8     
+ Misses        20642    20567      -75     
Flag Coverage Δ
dbase-extension 64.31% <37.58%> (+0.01%) ⬆️
unit-8.2 64.31% <37.58%> (+0.06%) ⬆️
unit-8.3 64.31% <37.58%> (+0.05%) ⬆️
unit-8.4 64.31% <37.58%> (+0.05%) ⬆️
unit-8.5 64.32% <37.58%> (+0.08%) ⬆️
unit-8.6 64.25% <37.58%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MauricioFauth MauricioFauth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MauricioFauth

Copy link
Copy Markdown
Member

[...] the other two controllers but as they are slightly different, [...]

Routines, Triggers and Events used to share the same "namespace" (RTE) and were handled by the same script. That's why they look so similar.

See: https://github.com/phpmyadmin/phpmyadmin/tree/QA_4_7/libraries/rte

@kamil-tekiela

Copy link
Copy Markdown
Contributor Author

[...] the other two controllers but as they are slightly different, [...]

Routines, Triggers and Events used to share the same "namespace" (RTE) and were handled by the same script. That's why they look so similar.

See: https://github.com/phpmyadmin/phpmyadmin/tree/QA_4_7/libraries/rte

Yes, I figured it out. There is some code that was very clearly copied from Routines. There is a lot of code debt and your other refactoring was very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants