Skip to content

Releases: matapatos/wp-fastendpoints

v2.1.0

15 Nov 14:58
eb5d9be
Compare
Choose a tag to compare
  • Adds support for router dependencies
  • Adds dependencies support for native WP REST endpoints by passing dependencies via argument
$router = new Router('api', 'v1');
$router->depends('buddypress');  // Global dependency across all sub-routers/endpoints
// Support for native WP REST endpoints
$args = [
    'methods' => 'GET',
    'depends' => ['buddypress'],
    ...
];
register_rest_route('api/v1', 'custom-endpoint', $args);

v2.0.0

17 Jul 08:09
Compare
Choose a tag to compare
  • Changed variable special vars from {ID} to <ID> to keep consistency
  • Specifying endpoint plugin dependencies. This feature by its own doesn't do anything but if the WP-FastEndpoints-Depends plugin is active it does speed up your endpoints 😊
$router->get('(?P<postId>[\d]+)', function ($postId) {
    return get_post($postId);
})
->hasCap('edit_post', '<ID>')
// With WP-FastEndpoints-Depends it only loads the buddypress plugin
->depends('buddypress');

v1.2.2

18 May 11:10
1c958d3
Compare
Choose a tag to compare
  • Added three new filter hooks to allow the customisation of the JSON schema validator:
    • fastendpoints_validator - Triggered by all validators e.g. schema and response
    • fastendpoints_schema_validator - Triggered only by the request schema validator
    • fastendpoints_response_validator - Triggered only by the response schema validator

v1.2.1

16 May 18:36
Compare
Choose a tag to compare

v1.2.0

10 May 18:52
d44f8d3
Compare
Choose a tag to compare
  • Dependency injection support for both permission handlers, middleware's and endpoint handler
  • Removed unnecessary plugin file
// postId is fetched from URL params
$router->get('(?P<postId>[\d]+)', function ($postId) {
    return get_post($postId);
});

v1.1.0

02 May 11:05
Compare
Choose a tag to compare
  • 100% test coverage
  • Integration tests
  • Middleware support
  • Upgraded PHP version to 8.1
  • Full support for WordPress 6.x versions
  • Updated both Response and Schema to a middleware

Initial release

17 Mar 16:39
Compare
Choose a tag to compare
Initial release Pre-release
Pre-release

Makes working with WordPress REST endpoints a breeze.