Update readme for v6.27#2784
Conversation
WalkthroughAdds release 6.27 documentation updates and a new PHP_CodeSniffer sniff ( Changes
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
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
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 theDeprecated:prefix used elsewhere. Also,FrmFieldType::get_select_atributesis 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
📒 Files selected for processing (2)
changelog.txtreadme.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.
There was a problem hiding this comment.
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 anif (...)condition (“opening/closing paren of the if condition”). Since the sniff triggers on everyT_BOOLEAN_AND, this can mis-locate expressions inreturn ...;, assignments, ternaries, etc. Consider adding stop conditions likeT_SEMICOLON,T_COMMA,T_RETURN,T_EQUAL,T_INLINE_THEN,T_INLINE_ELSE(and/or limiting the sniff to conditions).
29-31: Consider supportingandas well as&&(optional).If you want the sniff to catch
and, registerT_LOGICAL_ANDtoo; 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 === $bwith$bunknown => fix must NOT apply- parenthesized RHS and nested expressions => no false positives
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
phpcs.xmlis excluded by!**/*.xml
📒 Files selected for processing (3)
changelog.txtphpcs-sniffs/Formidable/Sniffs/CodeAnalysis/RedundantTruthyBeforeIdenticalSniff.phpreadme.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|falseat lines 95, 155;string|falseat line 243), but manual code inspection reveals noblank_line_before_statementviolations 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.
No description provided.