Skip to content

Conversation

@felixarntz
Copy link
Member

@felixarntz felixarntz commented Mar 14, 2023

Summary

Fixes #667

Relevant technical choices

  • Unless a module has already been using other files in a more specific way, this PR goes with the approach of splitting functions between a hooks.php file (functions that are used as hook callbacks) and a helper.php file (other functions, e.g. used by the hook functions).
  • This PR looks like a massive change, but no code whatsoever was functionally modified. All functions touched were simply moved between files without modifications.
  • The only code change that technically needs a closer review is all the load.php files, for whether they include the correct files and check for the correct function (any key function that is part of the respective module).

To avoid conflicts with other PRs, it would be great to review, iterate on, and merge this change ASAP.

Going forward, all modules will need to use their load.php file accordingly just to load other files. No actual code should be added directly to the load.php file of a module.

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

@felixarntz felixarntz added [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall performance plugin infrastructure Creating standalone plugins labels Mar 14, 2023
@felixarntz felixarntz added this to the 2.1.0 milestone Mar 14, 2023
@felixarntz
Copy link
Member Author

@mukeshpanchal27 Note that there will probably be merge conflicts between this PR and #670. We'll just have to fix them based on which PR gets merged first.

Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Thanks @felixarntz, The changes look good to me.

@mukeshpanchal27 mukeshpanchal27 merged commit bdc3f1b into trunk Mar 15, 2023
@mukeshpanchal27 mukeshpanchal27 deleted the update/667-module-load-files-only-for-loading branch March 15, 2023 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Issues for the overall performance plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove any functions, classes, constants etc. from module load.php files

4 participants