Skip to content

fix error wp.org#27

Merged
herewithme merged 5 commits intomasterfrom
add_arobase
Apr 2, 2026
Merged

fix error wp.org#27
herewithme merged 5 commits intomasterfrom
add_arobase

Conversation

@jdesousa-beapi
Copy link
Copy Markdown
Contributor

@jdesousa-beapi jdesousa-beapi commented Apr 2, 2026

Note

Medium Risk
Moderate risk because it changes the local/CI test harness and bumps the minimum PHP/tooling versions, which can break contributor workflows and CI. Runtime plugin logic changes are minimal (quote fix) and low risk.

Overview
Bumps plugin version to 2.0.9 and fixes the sanitize_file_name_chars list by replacing invalid “smart quote” characters with proper ASCII-quoted strings.

Migrates testing from Lando/Codeception to @wordpress/env (wp-env) with PHPUnit-only unit tests: removes Lando/BrowserStack scripts and Codeception config, adds package.json/.wp-env.json, updates GitHub Actions tests workflow to run via Node + wp-env, and updates docs/env defaults accordingly.

Updates release automation to deploy to WordPress.org via 10up deploy action and attach the generated zip to the GitHub release, and modernizes tooling/deps by requiring PHP ^8.0 and upgrading PHPUnit/PHPCS/WPCS.

Written by Cursor Bugbot for commit f6876ea. This will update automatically on new commits. Configure here.

francoistibo
francoistibo previously approved these changes Apr 2, 2026
- Removed Lando configuration and related scripts.
- Introduced wp-env configuration with .wp-env.json and updated .distignore.
- Updated .env file for local development with new database and WordPress settings.
- Migrated testing framework from Codeception to PHPUnit, removing related test configurations.
- Updated composer.json and package.json to reflect new dependencies and PHP version requirements.
- Adjusted README for installation and testing instructions.
- Cleaned up unused files and directories.
Comment thread package.json
"pretest:unit:report": "wp-env start",
"test:unit": "wp-env run cli --env-cwd=wp-content/plugins/bea-sanitize-filename ./vendor/bin/phpunit",
"test:unit:report": "wp-env run cli --env-cwd=wp-content/plugins/bea-sanitize-filename ./vendor/bin/phpunit --testdox",
"test:unit:once": "npm run wp-env:start && npm run test:unit && npm run wp-env:stop",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker containers not stopped on test failure

Low Severity

The test:unit:once script uses && to chain wp-env:start, test:unit, and wp-env:stop. Because && short-circuits on failure, if test:unit exits with a non-zero code, wp-env:stop is never executed, leaving Docker containers running and consuming resources. This contradicts the "one-shot" intent documented in the README. The CI workflow handles this correctly using if: always() for the stop step.

Fix in Cursor Fix in Web

Comment thread composer.json
- Bump version to 2.0.9 in all relevant files.
- Fix invalid smart quotes in special characters list.
- Migrate tests to `wp-env` with PHPUnit unit tests only.
- Improve testing documentation and scripts.
@herewithme herewithme merged commit 53aeb5a into master Apr 2, 2026
1 check passed
@herewithme herewithme deleted the add_arobase branch April 2, 2026 11:36
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated checkout action version in tests workflow

Medium Severity

The tests workflow uses actions/checkout@v2 while the release workflow was updated to actions/checkout@v4 in the same PR. v2 relies on Node.js 12, which GitHub Actions has deprecated and will eventually stop supporting, meaning this workflow will start failing. This is clearly an oversight since the rest of the workflow was heavily modernized.

Additional Locations (1)
Fix in Cursor Fix in Web

Comment thread .wp-env.json
"phpVersion": "8.0",
"plugins": [
"."
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate plugin mount in wp-env configuration

Medium Severity

The plugins array includes "." and mappings also mounts "." to wp-content/plugins/bea-sanitize-filename. This is a known wp-env anti-pattern that causes the plugin to be mounted twice — once under the workspace directory name and once under the explicit mapping name — resulting in duplicate entries in wp plugin list and potential activation under the wrong directory name. The "." entry in plugins is redundant when mappings already handles it.

Additional Locations (1)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants