Skip to content

Remove deprecated functions, filters and actions #1723

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

Merged
merged 2 commits into from
May 21, 2025

Conversation

pfefferle
Copy link
Member

@pfefferle pfefferle commented May 21, 2025

As we plan to have a major release next, we should cleanup the codebase and remove the deprecated functions.

I kept the most recent deprecations and some attributes we have not properly deprecated yet.

See #1703

Proposed changes:

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Go to '..'

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Cleaned up the codebase and removed deprecated functions.

As we plan to have a major release next, we should cleanup the codebase and remove the deprecated functions.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Removes deprecated functions, filters, actions, and corresponding tests in preparation for the next major release.

  • Deletes legacy test methods for deprecated collection, dispatcher, and comment APIs
  • Removes deprecated filter fallbacks and helper functions from core classes and functions
  • Cleans up deprecated wrapper functions in activitypub.php and the Users collection class

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/includes/collection/class-test-actors.php Deleted test for deprecated get_by_various
tests/includes/class-test-dispatcher.php Deleted tests for deprecated dispatcher filters
tests/includes/class-test-comment.php Deleted test for deprecated get_comment_type_names
includes/transformer/class-base.php Removed deprecated activitypub_post_locale filter
includes/functions.php Removed deprecated is_user_disabled and filter
includes/collection/class-users.php Deleted entire deprecated Users collection class
includes/class-migration.php Removed deprecated get_target_version method
includes/class-dispatcher.php Removed deprecated maybe_add_inboxes_of_blog_user and filter fallback
includes/class-comment.php Removed deprecated get_comment_type_names
activitypub.php Removed deprecated get_plugin_meta and get_plugin_version wrappers
.github/changelog/1723-from-description Added changelog entry for removal of deprecated code
Comments suppressed due to low confidence (3)

includes/functions.php:370

  • The global function is_user_disabled() was removed; if any third-party or internal code still calls it, this will cause a fatal error. Ensure all references are updated or document the breaking change in your upgrade guide.
function is_user_disabled( $user_id ) {

tests/includes/collection/class-test-actors.php:68

  • Removed the test for the deprecated get_by_various method. Consider adding tests for the new Actors::get_by_various behavior or documenting that legacy behavior is no longer supported.
public function test_deprecated_get_by_various( $item, $expected ) {

includes/class-dispatcher.php:45

  • Fallback logic for the deprecated activitypub_send_to_inboxes and activitypub_interactees_inboxes filters was removed. Ensure consumers are updated to use activitypub_additional_inboxes exclusively.
// Fallback for `activitypub_send_to_inboxes` filter.

Copy link
Member

@obenland obenland left a comment

Choose a reason for hiding this comment

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

That looks beautiful 😍

@pfefferle pfefferle merged commit 79b9b35 into trunk May 21, 2025
13 checks passed
@pfefferle pfefferle deleted the remove/deprecated-functions branch May 21, 2025 13:13
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.

3 participants