Skip to content

Make some 7.0 updates based on feedback - #3568

Merged
Crabcyborg merged 1 commit into
masterfrom
7.0_feedback_updates
Oct 13, 2026
Merged

Crabcyborg merged 1 commit into
masterfrom
7.0_feedback_updates

Conversation

@Crabcyborg

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: Strategy11/formidable-forms/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0a505edf-ec3a-460a-86c1-6a5ca6905224
📥 Commits

Reviewing files that changed from the base of the PR and between eebf92b and 13de60d.

📒 Files selected for processing (11)
  • classes/controllers/FrmAbilitiesEntriesController.php
  • classes/controllers/FrmAbilitiesFormsController.php
  • classes/controllers/FrmAbilitiesPaymentsController.php
  • classes/controllers/FrmAbilitiesStylesController.php
  • classes/controllers/FrmAbilitiesSubscriptionsController.php
  • classes/controllers/FrmMcpSettingsController.php
  • classes/models/FrmHcaptchaSettings.php
  • classes/models/FrmMcpCompat.php
  • classes/views/frm-fields/back-end/settings.php
  • tests/phpunit/abilities/test_FrmAbilitiesContract.php
  • tests/phpunit/fields/test_FrmCaptchaSpam.php
 _________________________________________________________________________________________________
< Errare Humanum Est, Perseverare in Debugging. To err is human, to persist in debugging, divine. >
 -------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@deepsource-io

deepsource-io Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in eebf92b...13de60d on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Oct 13, 2026 3:40p.m. Review ↗
JavaScript Oct 13, 2026 3:40p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

*/
public function test_optional_input_abilities_accept_omitted_input() {
foreach ( self::$no_required_input_abilities as $name ) {
$this->assertNotWPError( wp_get_ability( $name )->execute(), $name . ' should accept omitted input.' );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Call to an undefined method test_FrmAbilitiesContract::assertNotWPError()


The method you are trying to call is not defined, which can result in a fatal error.

continue;
}

$this->assertWPError( $ability->execute(), $name . ' should require its input.' );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Call to an undefined method test_FrmAbilitiesContract::assertWPError()


The method you are trying to call is not defined, which can result in a fatal error.

),
);
$errors = $this->validate_captcha();
$this->assertStringContainsString( 'not set up correctly', $errors[ 'field' . $this->captcha->id ], $code );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Call to an undefined method test_FrmCaptchaSpam::assertStringContainsString()


The method you are trying to call is not defined, which can result in a fatal error.

$errors = $this->validate_captcha();
$this->assertStringContainsString( 'not set up correctly', $errors[ 'field' . $this->captcha->id ], $code );
$settings->spam_handling['captcha'] = FrmSpamEntriesHelper::SAVE;
$this->assertSame( array(), $this->validate_captcha() );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Call to an undefined method test_FrmCaptchaSpam::assertSame()


The method you are trying to call is not defined, which can result in a fatal error.

$settings->spam_handling['captcha'] = FrmSpamEntriesHelper::SAVE;
$this->assertSame( array(), $this->validate_captcha() );
$reason = FrmSpamEntriesHelper::get_flagged_reason( array( 'form_id' => $this->captcha->form_id ) );
$this->assertStringContainsString( 'matching pair', $reason, $code );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Call to an undefined method test_FrmCaptchaSpam::assertStringContainsString()


The method you are trying to call is not defined, which can result in a fatal error.

@franky-the-going-merry franky-the-going-merry Bot added the franky-working Franky is actively reviewing this label Oct 13, 2026

@franky-the-going-merry franky-the-going-merry Bot 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.

Approve. Nothing blocking; four notes for the author.

  1. classes/models/FrmMcpCompat.php L99: the REQUIRED_ABILITY_FUNCTIONS docblock still says the Abilities API "comes from WordPress core in 7.0". The new message at L252 says 6.9, which matches core (WP_Ability::normalize_input() and validate_input() are @since 6.9.0). Change the docblock to 6.9 so the two agree.
  2. classes/models/FrmHcaptchaSettings.php L82: the not-using-dummy-secret message is a copy of the not-using-dummy-passcode one ("A test site key is paired with a live secret key"). hCaptcha's siteverify docs describe not-using-dummy-passcode as a test sitekey with a non-matching secret. I couldn't find not-using-dummy-secret in the docs, so I can't confirm the code or its direction. If it means a test secret with a live site key, the text is backwards. Please confirm the code against hCaptcha's response and word the message to match.
  3. classes/controllers/FrmMcpSettingsController.php L331: step 2 now says "beside the installed skill's scripts/frm-mcp helper". The removed comment said a plugin install keeps scripts in a versioned cache that every update replaces. The released skill's frm-mcp only reads frm-mcp.env next to the script, so this matches what ships, but an update will wipe the file. "Create the folder if needed" in the next line no longer fits, because the scripts folder already exists. Consider dropping that sentence, and keep the update caveat in the comment if it is still true.
  4. test_FrmAbilitiesContract.php: test_required_input_abilities_reject_omitted_input skips every ability without required and asserts nothing if none have it. A count assertion on the checked abilities would stop it passing empty.

Checked at 13de60d:

  • Abilities default => array(): I read core's normalize_input(), which returns the schema default when input is null, so omitted input now validates against the object schema. test_FrmAbilitiesContract runs 17/17 on the PR (15 on master) with Lite alone active on WP 7.0.3. I did not run the new tests against master code, so I haven't shown that they fail without the fix.
  • Not verified: test_FrmCaptchaSpam, including the new hCaptcha test. In my harness 8 of 14 tests fail on master and 9 of 15 on the PR, all the ones that set spam_handling['captcha'] to save, and the new test fails the same way. I couldn't tell whether the harness or the code is at fault, and CI is skipped while this is a draft, so the new test hasn't been seen passing anywhere.
  • Not exercised: the field-settings string was not rendered in a browser (one-word copy fix, no visual surface to screenshot). Skills and PHPCS/PHPStan were not run.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Oct 13, 2026
@Crabcyborg
Crabcyborg marked this pull request as ready for review October 13, 2026 17:52
@Crabcyborg
Crabcyborg merged commit ce07629 into master Oct 13, 2026
57 of 59 checks passed
@Crabcyborg
Crabcyborg deleted the 7.0_feedback_updates branch October 13, 2026 17:53
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