Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/27/2024 09:11:27 PM (9 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/blogs/template.php

    r13184 r14026  
    1919        $this->assertEquals( bp_core_get_last_activity( $time, __( 'Active %s', 'buddypress' ) ), bp_get_blog_last_active() );
    2020
    21         $blogs_template->blog = null;
     21        $blogs_template = null;
    2222    }
    2323
     
    3636        $this->assertEquals( bp_core_get_last_activity( $time, __( 'Active %s', 'buddypress' ) ), bp_get_blog_last_active( array( 'active_format' => true, ) ) );
    3737
    38         $blogs_template->blog = null;
     38        $blogs_template = null;
    3939    }
    4040
     
    5353        $this->assertEquals( bp_core_time_since( $time ), bp_get_blog_last_active( array( 'active_format' => false, ) ) );
    5454
    55         $blogs_template->blog = null;
     55        $blogs_template = null;
    5656    }
    5757
     
    7878        $this->assertSame( sprintf( __( 'Latest Post: %s', 'buddypress' ), '<a href="foo">bar</a>' ), bp_get_blog_latest_post() );
    7979
    80         $blogs_template->blog = null;
     80        $blogs_template = null;
    8181    }
    8282
     
    9696        $this->assertSame( sprintf( __( 'Latest Post: %s', 'buddypress' ), '<a href="foo">bar</a>' ), bp_get_blog_latest_post( array( 'latest_format' => true, ) ) );
    9797
    98         $blogs_template->blog = null;
     98        $blogs_template = null;
    9999    }
    100100
     
    114114        $this->assertSame( '<a href="foo">bar</a>', bp_get_blog_latest_post( array( 'latest_format' => false, ) ) );
    115115
    116         $blogs_template->blog = null;
     116        $blogs_template = null;
    117117    }
    118118
Note: See TracChangeset for help on using the changeset viewer.