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

Refactor: Deprecate msort #1752

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

yookoala
Copy link
Member

@yookoala yookoala commented Aug 31, 2023

Description

  • Rewrite all usages of msort in core to usort with documentation.
  • Properly document msort with phpdoc and mark it deprecated.

Motivation and Context

  • Part of the effort to retire old functions. See Meta: retire old functions in functions.php #1689.
  • msort is a really old function in Gibbon (First introduced to git repo in 2286c9b, which was when Gibbon first migrated to git). I'm not sure if it is used elsewhere in modules (although I've searched all modules to found no reference to it). Might be safer to make it deprecated here.

How Has This Been Tested?

  • Locally.
  • CI.

@yookoala yookoala changed the title Refactor/deprecate msort Refactor: Deprecate msort Aug 31, 2023
@yookoala
Copy link
Member Author

Test failed because arrow function used in this is a PHP 7.4 feature, but the composer PHP version config is now at 7.3. phpstan installed does not support PHP 7.4 syntax, hence the strange error message. #1753 will fix this issue.

@SKuipers
Copy link
Member

Thanks, can you rerun the checks now that #1753 is merged? It usually gives me the option to, but I'm not seeing it this time.

* Use usort and arrow function to replace original use of msort.
* Use usort and arrow function to replace original use of msort.
* Documented msort and mark it obsoleted.
@yookoala yookoala force-pushed the refactor/deprecate-msort branch from 7308671 to 266b239 Compare October 20, 2023 02:15
@yookoala
Copy link
Member Author

@SKuipers: All tests are past now :-)

Copy link
Member

@SKuipers SKuipers left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

@SKuipers SKuipers merged commit 5096d92 into GibbonEdu:v26.0.00 Oct 20, 2023
4 checks passed
@yookoala yookoala deleted the refactor/deprecate-msort branch October 20, 2023 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants