Skip to content
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

Add backward compatibility for DefaultTabServer, DefaultTabDatabase, DefaultTabTable, NavigationTreeDefaultTabTable and NavigationTreeDefaultTabTable2 #16714

Merged
merged 4 commits into from Mar 5, 2021

Conversation

csware
Copy link
Contributor

@csware csware commented Mar 4, 2021

Description

if a user has a legacy setting for DefaultTabServer, DefaultTabDatabase, DefaultTabTable, NavigationTreeDefaultTabTable and NavigationTreeDefaultTabTable2 don't provide a broken fallback, but mimic the old behavior.

Fixes #16698
Fixes #16713

This affects 5.1.0 and maybe other versions.

Before submitting pull request, please review the following checklist:

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch. For example, for bug fixes in a released version use the corresponding QA branch and for new features use the master branch. If you have a doubt, you can ask as a comment in the bug report or on the mailing list.
  • Every commit has proper Signed-off-by line as described in our DCO. This ensures that the work you're submitting is your own creation.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.
  • Any new functionality is covered by tests.

@csware
Copy link
Contributor Author

csware commented Mar 4, 2021

I'm not sure if this PR fixes all cases, such as LeftDefaultTabTable

@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #16714 (2f4060e) into QA_5_1 (3a01452) will decrease coverage by 0.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             QA_5_1   #16714      +/-   ##
============================================
- Coverage     53.11%   53.10%   -0.02%     
- Complexity    15202    15216      +14     
============================================
  Files           471      471              
  Lines         63207    63224      +17     
============================================
+ Hits          33573    33575       +2     
- Misses        29634    29649      +15     
Flag Coverage Δ Complexity Δ
dbase-extension ? ?
recode-extension 52.73% <83.33%> (+0.03%) 0.00 <0.00> (ø)
unit-7.1-ubuntu-latest 52.75% <83.33%> (+0.03%) 0.00 <0.00> (ø)
unit-7.2-ubuntu-latest 52.93% <83.33%> (+0.03%) 0.00 <0.00> (ø)
unit-7.3-ubuntu-latest 57.75% <83.33%> (+0.03%) 0.00 <0.00> (ø)
unit-7.4-ubuntu-latest 57.75% <83.33%> (+0.03%) 0.00 <0.00> (ø)
unit-8.0-ubuntu-latest 57.90% <83.33%> (+0.03%) 0.00 <0.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
libraries/classes/Menu.php 83.33% <0.00%> (-0.73%) 67.00 <0.00> (ø)
libraries/classes/Util.php 68.03% <100.00%> (+1.41%) 421.00 <0.00> (+14.00)
libraries/classes/Plugins/Import/ImportShp.php 56.95% <0.00%> (-15.90%) 42.00% <0.00%> (ø%)
libraries/classes/Import.php 63.27% <0.00%> (-0.27%) 246.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a01452...3ad189b. Read the comment docs.

@williamdes
Copy link
Member

This affects 5.1.0 and maybe other versions.

Only 5.1.0 for now, and 5.2.0-dev

I will rebase+squash your fix if @MauricioFauth also thinks this is a good fix
I kind of agree with the fix, because it makes sense but is more like a legacy support

Copy link
Member

@MauricioFauth MauricioFauth left a comment

Choose a reason for hiding this comment

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

It's better to add a default case to the switch instead of supporting these old values.

@csware
Copy link
Contributor Author

csware commented Mar 5, 2021

It's better to add a default case to the switch instead of supporting these old values.

What do you mean with a default value? Wouldn't that mean that the old values won't work any more?

Copy link
Member

@ibennetch ibennetch left a comment

Choose a reason for hiding this comment

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

We have always considered backwards compatibility important for our configuration settings, I'm glad you caught this.

LGTM

@williamdes
Copy link
Member

We have always considered backwards compatibility important for our configuration settings, I'm glad you caught this.

I agree it is important. Will add more tests before merging this

csware and others added 3 commits March 5, 2021 14:31
…r, DefaultTabDatabase, DefaultTabTable, NavigationTreeDefaultTabTable and NavigationTreeDefaultTabTable2

Fixes: phpmyadmin#16713

Signed-off-by: Sven Strickroth <email@cs-ware.de>
…d of "./")

Fixes: phpmyadmin#16698

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes self-assigned this Mar 5, 2021
@williamdes williamdes added this to In progress in pull-requests via automation Mar 5, 2021
@williamdes williamdes moved this from In progress to To merge in pull-requests Mar 5, 2021
@williamdes
Copy link
Member

LeftDefaultTabTable

I could not find anything named like that in the code and in the docs.

@williamdes williamdes changed the base branch from master to QA_5_1 March 5, 2021 13:57
Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

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

Good work, It works fine !
I added tests, this PR fixes 3 bugs in total

Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes merged commit 5880ed3 into phpmyadmin:QA_5_1 Mar 5, 2021
pull-requests automation moved this from To merge to Done Mar 5, 2021
@csware csware deleted the issue-16698 branch March 5, 2021 15:34
@csware
Copy link
Contributor Author

csware commented May 13, 2021

Any plans when a new version is released?

@ibennetch
Copy link
Member

ibennetch commented May 14, 2021 via email

@williamdes
Copy link
Member

The next release is slightly behind schedule already because of wanting to incorporate a fix for one remaining issue. William has prepared some solution for that, so if all goes well with it I expect a release in the coming days. Thanks for asking.

Yes, it is #16734 (comment)
Any feedback and testing is very welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
pull-requests
  
Done
4 participants