Skip to content

Attributes-PHP/wp-fastendpoints-my-plugin

Repository files navigation

Quick Start - WP-FastEndpoints

GitHub Actions Workflow Status (main) Supported WordPress Versions Software License

MyPlugin is a WordPress sample plugin that demonstrates how to use FastEndpoints.

Features

  • Sample router to manipulate blog posts (create, update, retrieve and delete)
  • Out of the box Unit tests + Integration tests using pestphp thanks to dingo-d/wp-pest
  • PHP code style fixer using laravel/pint
  • Composer scripts for running tests + linter + setting up WordPress

Requirements

Installation

Add plugin to WordPress and then install all the dependencies:

composer install

Lint

composer test:lint

Running tests

composer test             # Runs linter + unit and integration tests
composer test:unit        # Runs unit tests
composer test:integration # Runs integration tests

Setup WordPress

Please note that before running the integration tests you have to specify the WordPress version you want to use, via:

composer setup:wp:6.0     # For the latest 6.0.x version
composer setup:wp:6.1     # For the latest 6.1.x version
composer setup:wp:6.2     # For the latest 6.2.x version
composer setup:wp:6.3     # For the latest 6.3.x version
composer setup:wp:6.4     # For the latest 6.4.x version
composer setup:wp:6.5     # For the latest 6.5.x version
composer setup:wp:6.6     # For the latest 6.6.x version
composer setup:wp:6.7     # For the latest 6.7.x version
composer setup:wp:latest  # For the latest x.x.x version

MyPlugin was created by André Gil and is open-sourced software licensed under the MIT license.

About

Sample plugin that demonstrates how to use FastEndpoints

Topics

Resources

License

Stars

Watchers

Forks

Languages