Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- { series: "8.3", patch: "8.3.36" }
- { series: "8.4", patch: "8.4.27" }
- { series: "8.5", patch: "8.5.12" }
wp-version: ["6.8", "6.9", "7.0", "latest"]
wp-version: ["7.0", "7.1", "7.2-RC2"]

steps:
- name: Checkout
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ If your local app uses HTTPS with a private CA, set `BEEHIIV_SSLVERIFY` to `fals
Point wp-env at a specific PHP / WordPress core version to check compatibility with older or newer combinations than your default local setup, and get an HTML dashboard for that combination:

```bash
npm run test:compat -- --php=8.3 --wp=6.8
npm run test:compat -- --php=8.3 --wp=7.0
```

That selects PHP 8.3 / WP 6.8 (leaving it set for subsequent `npm run env:start` runs; clear with `npm run env:set-version -- --clear`), **destroys and recreates the wp-env environment**, checks the actual PHP versions against the security requirements above, runs PHPUnit, and writes `tests/phpunit/test-results/php8.3-wp6.8/dashboard.html`. The dashboard contains pass/fail counts, a per-class breakdown, and failure details. Different `--php`/`--wp` combinations have separate report directories. `--php` accepts supported branches 8.2–8.5; `--wp` accepts a WordPress.org release number (e.g. `6.8`), `latest` (wp-env's own default), or `nightly`.
That selects PHP 8.3 / WP 7.0 (leaving it set for subsequent `npm run env:start` runs; clear with `npm run env:set-version -- --clear`), **destroys and recreates the wp-env environment**, checks the actual PHP versions against the security requirements above, runs PHPUnit, and writes `tests/phpunit/test-results/php8.3-wp7.0/dashboard.html`. The dashboard contains pass/fail counts, a per-class breakdown, and failure details. Different `--php`/`--wp` combinations have separate report directories. `--php` accepts supported branches 8.2–8.5; `--wp` accepts a WordPress.org release number (e.g. `7.0`) or release candidate (e.g. `7.2-RC2`), `latest` (wp-env's own default), or `nightly`.

⚠️ `test:compat` deletes your current wp-env database and content for this project (`wp-env destroy`) every time it runs. Only use it against a wp-env instance you're fine wiping — not one with dev content you want to keep.

To update only the configuration, use `npm run env:set-version -- --php=8.3 --wp=6.8`. It writes to the gitignored `.wp-env.override.json`; apply the change with `npm run env:start`. Back up local content before switching versions. For an intentionally clean environment, `npm run env:destroy` deletes the project's database and content. `npm run test:php:report` regenerates a dashboard from an existing JUnit report (e.g. after `composer test`) without re-running anything.
To update only the configuration, use `npm run env:set-version -- --php=8.3 --wp=7.0`. It writes to the gitignored `.wp-env.override.json`; apply the change with `npm run env:start`. Back up local content before switching versions. For an intentionally clean environment, `npm run env:destroy` deletes the project's database and content. `npm run test:php:report` regenerates a dashboard from an existing JUnit report (e.g. after `composer test`) without re-running anything.

CI runs PHP 8.2–8.5 against WP 6.8 and `latest` on every PR (see `.github/workflows/test.yml`) and uploads one `phpunit-report-php{X}-wp{Y}` dashboard artifact per combination. E2E tests and release builds require host PHP 8.4.27 or later in that branch; E2E containers use the guarded PHP 8.4 images.
CI runs PHP 8.2–8.5 against WP 7.0, 7.1 and the newest 7.2 release candidate on every PR (the supported versions are the three most recent major WordPress releases; replace the release candidate entry with `7.2` once 7.2 is released) (see `.github/workflows/test.yml`) and uploads one `phpunit-report-php{X}-wp{Y}` dashboard artifact per combination. E2E tests and release builds require host PHP 8.4.27 or later in that branch; E2E containers use the guarded PHP 8.4 images.

## Development Commands

Expand Down
2 changes: 1 addition & 1 deletion beehiiv.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author: beehiiv
* Text Domain: beehiiv
* Domain Path: /languages
* Requires at least: 6.8
* Requires at least: 7.0
* Requires PHP: 7.4
*
* License: GPL-2.0-or-later
Expand Down
6 changes: 3 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
=== beehiiv ===
Contributors: beehiiv
Tags: newsletter, email, publishing, beehiiv, subscribe
Requires at least: 6.8
Tested up to: 7.0
Requires at least: 7.0
Tested up to: 7.2
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
Expand Down Expand Up @@ -70,7 +70,7 @@ If you do not have one yet, you can [sign up at beehiiv.com](https://www.beehiiv

= Requirements =

* WordPress 6.8 or later
* WordPress 7.0 or later
* PHP 7.4 or later
* An active [beehiiv](https://www.beehiiv.com/?utm_source=wordpress&utm_medium=referral&utm_campaign=marketplace) account on the Max or Enterprise plan ([learn more about plans](https://www.beehiiv.com/pricing?utm_source=wordpress&utm_medium=referral&utm_campaign=marketplace))

Expand Down
8 changes: 4 additions & 4 deletions scripts/test-compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* backward-compatibility testing.
*
* Usage:
* npm run test:compat -- --php=8.4 --wp=6.8
* npm run test:compat -- --php=8.4 --wp=7.0
*
* Writes:
* tests/phpunit/test-results/php8.4-wp6.8/junit.xml
* tests/phpunit/test-results/php8.4-wp6.8/dashboard.html
* tests/phpunit/test-results/php8.4-wp7.0/junit.xml
* tests/phpunit/test-results/php8.4-wp7.0/dashboard.html
*
* Runs `wp-env destroy` before starting, so each combination gets a genuinely
* clean WordPress install rather than the new core version's files sitting on
Expand Down Expand Up @@ -46,7 +46,7 @@ const args = parseArgs( process.argv.slice( 2 ) );

if ( ! args.php || ! args.wp ) {
console.error(
'Usage: npm run test:compat -- --php=<version> --wp=<version|latest|nightly>'
'Usage: npm run test:compat -- --php=<version> --wp=<version|latest|nightly> (a release candidate such as 7.2-RC2 also works)'
);
process.exit( 1 );
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/wp-env-set-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* `wp-env start` runs, because it detects that the resolved config changed.
*
* Usage:
* node scripts/wp-env-set-version.js --php=8.4 --wp=6.8
* node scripts/wp-env-set-version.js --php=8.4 --wp=7.0
* node scripts/wp-env-set-version.js --php=8.3 # PHP only, leave WP core as-is
* node scripts/wp-env-set-version.js --wp=nightly # WordPress/WordPress#master
* node scripts/wp-env-set-version.js --wp=latest # wp-env default (newest stable)
Expand All @@ -18,7 +18,7 @@
* Then apply with: npm run env:start
*
* Add --destroy to also run `wp-env destroy` right away (e.g.
* `--php=8.4 --wp=6.8 --destroy`). wp-env only refreshes the WordPress core
* `--php=8.4 --wp=7.0 --destroy`). wp-env only refreshes the WordPress core
* files when the version changes, not the database, so a stale database
* can trigger the "database needs to be updated" screen or skew test
* results after switching versions -- --destroy avoids that by starting
Expand Down
Loading