Skip to content

Contributing and Releasing

webdesign29 edited this page Jun 13, 2026 · 1 revision

Contributing & Releasing

Contributions are welcome! The canonical guide is CONTRIBUTING.md in the repo; this page mirrors the essentials.

Development

The plugin is dependency-free at runtime. For tooling:

composer install      # phpcs (WordPress Coding Standards) + PHP-compat

Before you push

# 1. Lint every PHP file (must pass on PHP 7.4+)
find . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l

# 2. Unit tests (no WordPress runtime required)
for t in tests/unit/*.php; do php "$t" || break; done

# 3. Coding standards
vendor/bin/phpcs

CI runs lint + unit tests on PHP 7.4 / 8.1 / 8.3.

Guidelines

  • PHP 7.4 compatible. No match, nullsafe ?->, str_contains/str_starts_with, named args, constructor promotion, or enums. (php -l on 8.x won't catch 8.0-only APIs — keep it in mind.)
  • Fail open. A bext call must never break a WordPress request: is_wp_error-check and time-bound every network call.
  • Escape on output, sanitize on input. Verify a nonce + current_user_can in handlers.
  • No secrets in the repo. Tokens go in settings / wp-config constants.
  • Match the surrounding style.

Tests

  • WP-free unit tests live in tests/unit/*.php and run with plain php (they stub the few WordPress functions they touch). Add one when you change config resolution, transport, or a pure helper.
  • A purge-contract integration script is in tests/integration/.

Releasing

  1. Bump the version in bext-wp.php (header and BEXT_WP_VERSION) and mu-loader.php.
  2. Add a CHANGELOG.md entry.
  3. Tag vX.Y.Z and push.
  4. The fleet deploy (bin/deploy-fleet.sh) reads the version from the plugin header.

Sponsors

Maintained with support from webdesign29 and Inklura. Want to sponsor? Use the repo's Sponsor button or open an issue.

Clone this wiki locally