Skip to content

Update readme for v6.27#2784

Merged
Crabcyborg merged 4 commits into
masterfrom
update_readme_for_6.27
Jan 13, 2026
Merged

Update readme for v6.27#2784
Crabcyborg merged 4 commits into
masterfrom
update_readme_for_6.27

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 12, 2026

Walkthrough

Adds release 6.27 documentation updates and a new PHP_CodeSniffer sniff (RedundantTruthyBeforeIdenticalSniff) that detects and auto-fixes redundant truthy checks before identical comparisons. Also updates readme.txt stable tag from 6.26.1 to 6.27 and expands the changelog with new features, fixes, and breaking notes.

Changes

Cohort / File(s) Summary
Documentation & Metadata Updates
changelog.txt, readme.txt
Added a new 6.27 changelog section (New, Fix, Breaking entries), updated readme.txt stable tag from 6.26.1 to 6.27, and expanded release notes covering payment UI, coupons tab, CSS/view updates, Square autofill fix, font/icon removal, Pro CSS tweaks, stability fixes, and PHP/WP compatibility breaking changes.
PHPCS Sniff Addition
phpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.php
New sniff class RedundantTruthyBeforeIdenticalSniff added to detect patterns like $var && $var === ..., emit fixable errors, and apply token-based fixes that remove redundant truthy checks and the &&, leaving only the identical comparison.

Sequence Diagram(s)

(omitted — changes are documentation and a static analysis addition; no multi-component runtime flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Update readme for v6.23 #2457: Similar version bump documentation update—adds new top-level changelog section and updates readme metadata (stable tag).
  • Prepare for 6.26.1 #2663: Related release metadata management—modifies readme.txt and changelog.txt for version-specific updates and stable tag synchronization.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a pull request description explaining the changes, including the version bump, changelog updates, and the new PHP_CodeSniffer sniff implementation.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update readme for v6.27' is partially related to the changeset. While it accurately describes updates to readme.txt and changelog.txt for version 6.27, it omits the significant addition of a new PHP_CodeSniffer sniff class, which represents a material code change beyond just documentation updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In @changelog.txt:
- Around line 2-13: The changelog contains a typo in the generated CSS filename:
replace the incorrect 'formdiableforms.css' with the correct
'formidableforms.css' wherever it appears (e.g., in the line "optimized in the
generated formdiableforms.css file when Pro is not active"); update the
changelog entry text to use 'formidableforms.css' so documentation and
troubleshooting references match the actual filename.
- Line 14: Update the declared PHP requirement in readme.txt from "Requires PHP:
7.0" to "Requires PHP: 8.0" to reflect use of PHP 8.0-only functions
(str_contains, str_starts_with, str_ends_with, array_key_last, array_key_first)
used in the codebase; then edit the changelog entry (the bullet mentioning
WordPress <5.9) to remove the confusing WP version clause and instead clearly
state that using PHP <8.0 will cause fatal errors while noting the minimum
WordPress requirement is 6.3 (e.g., replace the current sentence with one that
explicitly calls out PHP <8.0 as incompatible and leaves WP minimum as 6.3).

In @readme.txt:
- Around line 374-386: The changelog and any documentation refer to a misspelled
generated CSS filename "formdiableforms.css" — update those occurrences to the
correct filename "formidableforms.css" (search for the literal string
"formdiableforms.css" in the changelog entry and related doc strings and replace
with "formidableforms.css"), and ensure any automated generation/config code
that emits that filename (references to the generated CSS filename) similarly
uses "formidableforms.css" so the docs and generated assets match.
- Line 387: The plugin declares "Requires PHP: 7.0" while the code uses PHP‑8.0+
natives (str_contains, str_starts_with, str_ends_with, array_key_last,
array_key_first); update the PHP requirement metadata instead of leaving it
inconsistent: change the WordPress.org readme "Requires PHP" value to 8.0 and
also update any plugin header "Requires PHP" in your main plugin file and
composer.json/php requirement (or platform config) to ">=8.0" so metadata
matches the actual usage of those functions (alternatively, add/polyfill those
specific functions if you must remain on 7.x).
🧹 Nitpick comments (2)
changelog.txt (1)

15-17: Changelog consistency: consider labeling the last bullet as “Deprecated:” (and double-check method name spelling).
The last bullet reads like a deprecation entry but lacks the Deprecated: prefix used elsewhere. Also, FrmFieldType::get_select_atributes is intentionally misspelled historically, but it’s worth ensuring you want that exact string in release notes.

Optional formatting tweak
-* An unused FrmTransLiteSubscriptionsController::list_subscriptions_shortcode function and its related view file have been deprecated.
+* Deprecated: An unused FrmTransLiteSubscriptionsController::list_subscriptions_shortcode function and its related view file have been deprecated.
readme.txt (1)

390-390: Changelog consistency: consider labeling this as “Deprecated:”.

Optional formatting tweak
-* An unused FrmTransLiteSubscriptionsController::list_subscriptions_shortcode function and its related view file have been deprecated.
+* Deprecated: An unused FrmTransLiteSubscriptionsController::list_subscriptions_shortcode function and its related view file have been deprecated.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 567a4be and 0a3ed5a.

📒 Files selected for processing (2)
  • changelog.txt
  • readme.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Cypress
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: PHP 8 tests in WP 6.9
🔇 Additional comments (1)
readme.txt (1)

8-8: Stable tag bump to 6.27 looks correct.

Comment thread changelog.txt
Comment thread changelog.txt
Comment thread readme.txt
Comment thread readme.txt
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
@phpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.php:
- Around line 41-43: In the process(File $phpcsFile, $stackPtr) method of
RedundantTruthyBeforeIdenticalSniff remove the unused local assignment $tokens =
$phpcsFile->getTokens(); since $tokens is never referenced; simply delete that
line (or replace with a comment if you prefer to document why tokens are not
needed) to satisfy static analysis.
🧹 Nitpick comments (3)
phpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.php (3)

97-207: Expression-boundary detection is “if()-shaped”; consider broader stop tokens.

findExpressionBefore/After() assumes parentheses delimit an if (...) condition (“opening/closing paren of the if condition”). Since the sniff triggers on every T_BOOLEAN_AND, this can mis-locate expressions in return ...;, assignments, ternaries, etc. Consider adding stop conditions like T_SEMICOLON, T_COMMA, T_RETURN, T_EQUAL, T_INLINE_THEN, T_INLINE_ELSE (and/or limiting the sniff to conditions).


29-31: Consider supporting and as well as && (optional).

If you want the sniff to catch and, register T_LOGICAL_AND too; otherwise the rule will be inconsistent across equivalent syntax.


41-87: Add sniff tests/fixtures before relying on autofix.

Given the high risk of subtle behavior changes, please add fixture-based tests covering:

  • truthy literals ('foo', 1, true) => fix applies
  • falsy literals ('0', 0, '', false, null) => fix must NOT apply
  • $a && $b === $a / $a && $a === $b with $b unknown => fix must NOT apply
  • parenthesized RHS and nested expressions => no false positives
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a3ed5a and 4796462.

⛔ Files ignored due to path filters (1)
  • phpcs.xml is excluded by !**/*.xml
📒 Files selected for processing (3)
  • changelog.txt
  • phpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.php
  • readme.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • readme.txt
🧰 Additional context used
🪛 GitHub Actions: Inspections
phpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.php

[error] 1-1: PHP CS Fixer reported a fixable issue during dry-run: RedundantTruthyBeforeIdenticalSniff.php (phpdoc_types_order, blank_line_before_statement). Found 1 of 511 files that can be fixed in 7.323 seconds. Command failed: './vendor/bin/php-cs-fixer fix --dry-run --verbose' (exit code 8).

🪛 PHPMD (2.15.0)
phpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.php

42-42: Avoid unused local variables such as '$tokens'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: Cypress
  • GitHub Check: PHP 7.4 tests in WP 6.9
🔇 Additional comments (3)
changelog.txt (1)

2-17: Tighten wording for compatibility note + fix grammar.

  • Line 14 reads a bit self-contradictory (“WP < 5.9” vs “min WP is 6.3”); consider explicitly framing it as “unsupported installs” to avoid confusion.
  • Line 17 should be singular (“has been deprecated”).
Proposed diff
-* Breaking: Many modern PHP functions are now being used including str_contains, str_starts_with, str_ends_with, array_key_last, and array_key_first. If you are using both a WordPress version older than 5.9, and a PHP version lower than 8.0, this will introduce fatal errors. Note that the minimum required WordPress version is already set to 6.3.
+* Breaking: Many modern PHP functions are now being used including str_contains, str_starts_with, str_ends_with, array_key_last, and array_key_first. If you are running an unsupported WordPress version older than 5.9 and a PHP version lower than 8.0, this can introduce fatal errors. Note that the minimum required WordPress version is already set to 6.3.
 ...
-* An unused FrmTransLiteSubscriptionsController::list_subscriptions_shortcode function and its related view file have been deprecated.
+* An unused FrmTransLiteSubscriptionsController::list_subscriptions_shortcode function and its related view file has been deprecated.

Likely an incorrect or invalid review comment.

phpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.php (2)

1-326: [Unable to rewrite: Original review comment is empty. However, verification found that the RedundantTruthyBeforeIdenticalSniff is not registered in the ruleset.xml and has no test coverage.]


1-18: Run php-cs-fixer to identify actual formatting violations.

I examined the file and found union types in docblocks (array|false at lines 95, 155; string|false at line 243), but manual code inspection reveals no blank_line_before_statement violations in the 89–256 range. The union types already appear to be in correct order per the config rules. Without executing php-cs-fixer directly, I cannot confirm which specific rules would actually be violated. CI output should clarify the exact violations.

@Crabcyborg Crabcyborg merged commit f8623b0 into master Jan 13, 2026
16 checks passed
@Crabcyborg Crabcyborg deleted the update_readme_for_6.27 branch January 13, 2026 02:55
stephywells pushed a commit that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant