MyPlugin is a WordPress sample plugin that demonstrates how to use FastEndpoints.
- Follow up our guide at Quick Start FastEndpoints Wiki »
- 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
- PHP 8.1+
- WordPress 6.x
- attributes-php/wp-fastendpoints
Add plugin to WordPress and then install all the dependencies:
composer installcomposer test:lintcomposer test # Runs linter + unit and integration tests
composer test:unit # Runs unit tests
composer test:integration # Runs integration testsPlease 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 versionMyPlugin was created by André Gil and is open-sourced software licensed under the MIT license.