Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/27/2024 09:11:27 PM (15 months ago)
Author:
espellcaste
Message:

Include the V2 of the BP REST API in BuddyPress core.

We are officially deprecating the V1 of the BP REST API. And bundling the new, default, V2 of the BP REST API inside BuddyPress core. Previously, the V1 was developed as a plugin in a separate repo (https://github.com/buddypress/BP-REST).

  • One of the main differences between the V1 and V2 is how objects are returned. Single items are no longer returned as an array;
  • We have a new BP_Test_REST_Controller_Testcase for testing the new API endpoints;
  • We changed the names of our controllers to follow our autoloader rules;
  • Removed the BP-REST plugin from wp-env and from our release script;
  • And we added notices for the deprecated V1 API (endpoints and files).

Props imath & I. ;)

Fixes #8200
See #9145
Closes https://github.com/buddypress/buddypress/pull/337

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/members/functions.php

    r13985 r14026  
    3434        // 1. Admin can delete user account
    3535        $this->set_current_user( $admin_user );
    36         $user1 = self::factory()->user->create( array( 'role' => 'subscriber' ) );
     36        $user1 = self::factory()->user->create();
    3737        bp_core_delete_account( $user1 );
    3838        $maybe_user = new WP_User( $user1 );
     
    5050
    5151        // User cannot delete other's account
    52         $user3 = self::factory()->user->create( array( 'role' => 'subscriber' ) );
    53         $user4 = self::factory()->user->create( array( 'role' => 'subscriber' ) );
     52        $user3 = self::factory()->user->create();
     53        $user4 = self::factory()->user->create();
    5454        $this->set_current_user( $user3 );
    5555        bp_core_delete_account( $user4 );
     
    129129    public function test_bp_members_get_user_url_after_directory_page_update() {
    130130        // Generate user
    131         $user_id = self::factory()->user->create( array( 'role' => 'subscriber' ) );
     131        $user_id = self::factory()->user->create();
    132132        $this->set_permalink_structure( '/%postname%/' );
    133133
Note: See TracChangeset for help on using the changeset viewer.