Skip to content

Declare the WordPress and PHP versions bcc-login needs - #230

Merged
cs1m0n merged 5 commits into
masterfrom
fix/bcc-login-requirements
Nov 11, 2026
Merged

cs1m0n merged 5 commits into
masterfrom
fix/bcc-login-requirements

Conversation

@cs1m0n

@cs1m0n cs1m0n commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Problem

bcc-login's package.json says it needs WordPress 3.0 and PHP 5.3. The plugin's updater reads these values from master and offers new versions to every site above them, including sites the new versions break:

  • The settings page and the editor's visibility panel depend on react-jsx-runtime, which WordPress added in 6.6. On older versions WordPress doesn't load them.
  • The PHP code uses typed properties (PHP 7.4) and functions from WordPress 5.4+ (is_favicon(), which runs on every front-end request).

The updater also compared with <, so a site running exactly the required WordPress version (WordPress reports 6.6.0 as 6.6) never got updates.

Changes

  • package.json: requires 6.6, requires_php 7.4, and tested 7.0 (it said 5.8, below the new minimum).
  • The updater offers an update when the site runs at least these versions (<=).
  • bcc-login.php: Requires at least: 6.6 and Requires PHP: 7.4 headers, so WordPress itself won't activate the plugin on older versions.

The updater reads package.json from master, so once this is merged, sites below WordPress 6.6 or PHP 7.4 stop being offered updates. They keep the version they have.

Merging

  • Merge this after Report each site's versions and user counts to the widgets API #228 (the site report) has been released, and leave a day between them. Report each site's versions and user counts to the widgets API #228 was released as v1.2.14 on 14 October at 09:11 UTC, so this condition has been met since 15 October. Once this is on master, sites below WordPress 6.6 or PHP 7.4 stop getting updates, including the release that makes them report. With a day in between, they still pick up the report first, so the inventory shows exactly those sites.
  • Those sites keep the version they have. Check the site report for any below WordPress 6.6 or PHP 7.4 that aren't on the latest release yet (v1.2.21, which has the feed key fix) before merging.
  • The release bot rewrites last_updated, the line after requires_php, on every release. After another bcc-login release this branch needs a rebase: keep both changes in package.json.
  • Installed sites still run the old < check until they update. So a site on exactly WordPress 6.6.0 gets this release only once it's on 6.6.1 or later. The <= change helps from the next release on.

Testing

  • All 24 PHP files pass php -l on PHP 7.4, rechecked after merging master at v1.2.21. The only PHP 8 function in use, str_contains, is provided by WordPress 5.9+. The code added since v1.2.15 uses wp_date (WordPress 5.3), random_bytes and hash_equals, all within these minimums.
  • The built settings.asset.php and visibility.asset.php list react-jsx-runtime as a dependency.
  • The new comparison offers updates for WordPress 6.6, 6.6.1 and 7.0.2, and not for 6.5.5 or 6.6-RC1. It offers them for PHP 7.4.0 and 8.4, and not for 7.3.
  • PHPStan with the CI config passes.

🤖 Generated with Claude Code

package.json said WordPress 3.0 and PHP 5.3, so the updater offered new
versions to sites they break. The plugin's scripts need WordPress 6.6
(react-jsx-runtime) and its PHP needs 7.4 (typed properties). The updater
now also accepts a site that runs exactly the required version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cs1m0n
cs1m0n requested a balanced review from Copilot October 14, 2026 08:40
@cs1m0n cs1m0n self-assigned this Oct 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Compatibility metadata remains contradictory, and prerequisite PR #228 has not yet been released.

2 open findings
What changed in this PR

Declares BCC Login’s runtime requirements and aligns update eligibility checks.

Changes:

  • Requires WordPress 6.6 and PHP 7.4.
  • Allows updates when versions exactly meet minimums.
  • Adds matching WordPress plugin headers.
File Description
plugins/​bcc-login/​package.json Updates minimum versions.
plugins/​bcc-login/​includes/​class-bcc-login-updater.php Makes minimum comparisons inclusive.
plugins/​bcc-login/​bcc-login.php Adds activation requirement headers.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread plugins/bcc-login/package.json Resolved
Comment thread plugins/bcc-login/package.json Resolved
cs1m0n and others added 4 commits October 14, 2026 13:28
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"tested" was still 5.8, below the new minimum of 6.6, so WordPress would
call the plugin untested on every version it supports. It ran on WordPress
7.0.2 in the tests of these changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cs1m0n
cs1m0n merged commit f75bd92 into master Nov 11, 2026
7 checks passed
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.

2 participants