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

Modernize codebase and QA #3

Merged
merged 5 commits into from
May 20, 2024
Merged

Modernize codebase and QA #3

merged 5 commits into from
May 20, 2024

Conversation

gmazzap
Copy link
Contributor

@gmazzap gmazzap commented May 16, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix, Feature, docs update.

What is the current behavior? (You can also link to an open issue here)

Modern PHP versions are not fully supported, CI is not working (uses Travis), there's no static analysis, and the license is wrong

What is the new behavior (if this is a feature change)?

  • Modernize the codebase to support recent PHP versions and up-to-date Syde coding standards.
  • Move logic from the utils.php file to an internal Functions class (all-static, only for encapsulation and autoload).
  • Modernize QA:
    • Move out from Travis to GitHub actions.
    • Rewrite tests, update the PHPUnit version, tests now include the real WordPress functions instead of stubs.
    • Added static analysis.
  • Introduced remove_all_object_hooks().
  • Introduced remove_static_method_hook() to replace the now deprecated remove_class_hook() (which is converted to an alias).
  • In remove_closure_hook() is now possible to use "mixed" as the target parameter type when the closure param declares no type.
  • License change from MIT to GPL due to usage of WordPress functions.
  • README refresh.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No (in the public API), Yes because remove "internal" functions.

Other information:

Suggested release if merged: 1.0.0.

gmazzap added 3 commits May 16, 2024 19:43
- Modernize codebase to support recent PHP versions and up-to-date Syde coding standards.
- Move logic from `utils.php` file to an internal `Functions` class (all-static, only for encapsulation and autoload).
- Modernize QA:
    - Move out from Travis to GitHub actions.
    - Rewrite tests, update PHPUnit version, tests now include the real WordPress functions instead of stubs.
    - Added static analysis.
- Introduced `remove_all_object_hooks()`.
- Introduced `remove_static_method_hook()` to replace the now deprecated `remove_class_hook()` (which is converted to an alias).
- In `remove_closure_hook()` is now possible to use `"mixed"` as target parameter type when the closure param declare no type.
- License change from MIT to GPL due to usage of WordPress functions.
- README refresh.
@gmazzap gmazzap requested a review from Chrico May 16, 2024 18:14
Copy link
Member

@Chrico Chrico left a comment

Choose a reason for hiding this comment

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

I did not do an in-depth code review, but checked the previous versoin and the new one and the changes. It looks good to me and the Github Actions are also running successfully.

Let's go with the 1.0.0 💪🏻

@gmazzap gmazzap merged commit 782b914 into master May 20, 2024
@gmazzap gmazzap deleted the modernize branch May 20, 2024 17:03
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.

2 participants