Skip to content

Guarded neve font pairs - #516

Merged
pirate-bot merged 3 commits into
developmentfrom
bugfix/509
Sep 12, 2026
Merged

pirate-bot merged 3 commits into
developmentfrom
bugfix/509

Conversation

@girishpanchal30

Copy link
Copy Markdown
Contributor

Summary

Improves compatibility with older versions of the Neve theme by enhancing the guard logic in the get_font_parings() method and adds a new test to ensure backward compatibility. The main focus is to prevent fatal errors when certain Neve settings are not present, as was the case in Neve versions prior to 3.5.0.

Check before Pull Request is ready:

Closes #509

@pirate-bot

pirate-bot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Plugin build for d6eaa20 is ready 🛎️!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The regression test relies on private implementation details instead of the repository-required public testing seam.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Prevents admin initialization failures when older Neve settings APIs lack font-pair members.

Changes:

  • Guards access to Neve’s font-pair constant and default property.
  • Adds fallback compatibility coverage.
File summaries
File Description
includes/Admin.php Adds compatibility guards before reading Neve font pairs.
tests/neve-font-pairs-test.php Tests fallback pairs with an incompatible Neve API stub.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

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

Comment thread tests/neve-font-pairs-test.php Outdated

@pirate-bot pirate-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes requested: The new fallback test depends on an ignored frontend build file.

A PHP 7.4 focused run reached both tests. One passed, and one errored before its assertion.

Validation details
  • PHPUnit 9.6.36 ran the new class on PHP 7.4.33. It reported one pass and one missing-file error.
  • PHP lint passed for both changed PHP files.
  • The changed guard introduced no security boundary regression.
Untested areas
  • The full repository suite was left to CI.

🤖 Automated review · run code-review-agent_6aa39da0504ae4.26384238.


🤖 Review agent — review posted ✅

Run code-review-agent_6aa39da0504ae4.26384238 · trail

Comment thread tests/neve-font-pairs-test.php Outdated
@pirate-bot

pirate-bot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

🤖 Review agent — review failed ❌

  • Error: The job died outside the run (hard timeout or worker restart). The stopped sandbox is kept for recovery.

Run code-review-agent_6aa3a4fe297b35.81310158 · trail

@pirate-bot pirate-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved: The compatibility guard prevents the reported crash, and the focused regression test passes.

PHP 7.4 accepted the compatible guard and the incompatible test case.

Validation details
  • PHPUnit 9.6.36 passed three focused tests on PHP 7.4.33 with 12 assertions.
  • A PHP 7.4 guard probe accepted the compatible Neve API shape.
  • The changed hunks introduced no security boundary regression.
Untested areas
  • The full repository suite was left to CI.

🤖 Automated review · run code-review-agent_6aa3a4fe297b35.81310158.

@pirate-bot
pirate-bot merged commit ac3a68a into development Sep 12, 2026
6 checks passed
@pirate-bot
pirate-bot deleted the bugfix/509 branch September 12, 2026 20:01
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.

Admin initialization crashes when Neve Config lacks MODS_TPOGRAPHY_FONT_PAIRS

4 participants