Skip to content

Add generic entry storage and field protection APIs - #3665

Open
Crabcyborg wants to merge 10 commits into
masterfrom
feat/integration-storage-guards
Open

Crabcyborg wants to merge 10 commits into
masterfrom
feat/integration-storage-guards

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Integrations need to prevent entry storage and protect required fields at the model layer, including direct calls and XML imports. Add generic storage and field protection APIs, and provide the form object to the final rendering filter so integrations can customize output for that form.

Supports https://github.com/Strategy11/formidable-registration/pull/409. This PR contains the three required Lite source changes plus six regression tests. It contains no registration-specific logic and requires no Pro changes.

Changes

  • Add FrmEntry::allows_save() and frm_allow_entry_save. Honor the prevent_entry_storage form option for both the form and its parent. Reject blocked standard and XML creates and updates before persistence and associated actions. Updates also check the existing entry's form when the caller omits or changes the form ID.
  • Add frm_field_values_before_update so integrations can preserve field requirements before saving.
  • Add FrmField::can_destroy() and frm_can_destroy_field, enforced before deleting a field.
  • Pass the form object as the second argument to frm_filter_final_form. Existing callbacks accepting only HTML remain compatible.

Testing

  • Full Lite suite: 1,006 tests and 5,252 assertions, with no failures or errors. The run reports 99 PHPUnit notices, three skips, and three incomplete tests.
  • Registration account form regression suite with Pro active: 19 tests and 264 assertions pass. Bootstrap emits the Lite translation-loading notice.
  • New regression tests cover standard and XML write blocking, parent form storage policy, updates without a form ID, denied field deletion, field update values, and form context through the real shortcode.
  • Scoped PHP syntax, PHPCS, PHP-CS-Fixer, Rector, Mago lint, and typos checks pass. PHPCS uses the shared Formidable sniffs via a runtime path setting.
  • Plugin-wide Mago analysis exits successfully with two warnings in unchanged files. Psalm reports four errors in unchanged FrmAppHelper, FrmAddon, and FrmShowForm code.
  • Plugin-wide PHPStan passes.
  • Browser verification has not been run.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ab4ee48 and 26f4b3b.

Files selected for processing: 9

  • classes/controllers/FrmFieldsController.php
  • classes/controllers/FrmFormsController.php
  • classes/helpers/FrmXMLHelper.php
  • classes/models/FrmEntry.php
  • classes/models/FrmField.php
  • js/formidable_admin.js
  • js/src/admin/admin.js
  • tests/phpunit/entries/test_FrmIntegrationGuards.php
  • tests/phpunit/fields/test_FrmFieldsAjax.php
  • 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

@deepsource-io

deepsource-io Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in ab4ee48...26f4b3b 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 ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Nov 18, 2026 7:55p.m. Review ↗
JavaScript Nov 18, 2026 7:55p.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.

*/
$form = apply_filters( 'frm_filter_final_form', $form );
}
$form = apply_filters( 'frm_filter_final_form', $form, $form_object );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

Comment thread classes/models/FrmEntry.php Outdated
}
}

return (bool) apply_filters( 'frm_allow_entry_save', true, $values );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

* @param array $values Field values to save.
* @param int $id Existing field ID.
*/
$values = apply_filters( 'frm_field_values_before_update', $values, $id );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

* @return bool
*/
public static function can_destroy( $id ) {
return (bool) apply_filters( 'frm_can_destroy_field', true, $id );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

'name' => 'Original',
);
$entry_id = FrmEntry::create( $values );
$this->assertNotFalse( $entry_id, 'Ordinary entry creation should remain available.' );

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_FrmIntegrationGuards::assertNotFalse()


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


try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );

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_FrmIntegrationGuards::assertFalse()


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

try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );
$this->assertNotFalse( FrmField::getOne( $field_id ), 'A denied deletion should preserve the field.' );

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_FrmIntegrationGuards::assertNotFalse()


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

} finally {
remove_filter( 'frm_can_destroy_field', '__return_false' );
}
$this->assertNotFalse( FrmField::destroy( $field_id ), 'Removing the filter should allow normal deletion.' );

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_FrmIntegrationGuards::assertNotFalse()


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


try {
FrmField::update( $field_id, array( 'name' => 'Changed' ) );
$this->assertSame( 'Protected ' . $field_id, FrmField::getOne( $field_id )->name, 'The filtered values and field ID should be used before persistence.' );

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_FrmIntegrationGuards::assertSame()


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


try {
$html = do_shortcode( '[formidable id="' . $form_id . '"]' );
$this->assertStringContainsString( 'Form context: ' . $form_id, $html, 'The final output filter should receive the form being rendered.' );

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_FrmIntegrationGuards::assertStringContainsString()


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

*/
$form = apply_filters( 'frm_filter_final_form', $form );
}
$form = apply_filters( 'frm_filter_final_form', $form, $form_object );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

Comment thread classes/models/FrmEntry.php Outdated
}
}

return (bool) apply_filters( 'frm_allow_entry_save', true, $values );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

* @param array $values Field values to save.
* @param int $id Existing field ID.
*/
$values = apply_filters( 'frm_field_values_before_update', $values, $id );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

* @return bool
*/
public static function can_destroy( $id ) {
return (bool) apply_filters( 'frm_can_destroy_field', true, $id );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

try {
$this->assertFalse( FrmEntry::create( $values ), 'The filter should block standard creation.' );
$this->assertFalse( FrmEntry::create_entry_from_xml( $values ), 'The filter should block XML creation.' );
$this->assertFalse( FrmEntry::update( $entry_id, array( 'name' => 'Changed' ) ), 'The filter should block standard updates without a form ID.' );

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_FrmIntegrationGuards::assertFalse()


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


try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );

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_FrmIntegrationGuards::assertFalse()


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

try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );
$this->assertNotFalse( FrmField::getOne( $field_id ), 'A denied deletion should preserve the field.' );

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_FrmIntegrationGuards::assertNotFalse()


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

} finally {
remove_filter( 'frm_can_destroy_field', '__return_false' );
}
$this->assertNotFalse( FrmField::destroy( $field_id ), 'Removing the filter should allow normal deletion.' );

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_FrmIntegrationGuards::assertNotFalse()


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


try {
FrmField::update( $field_id, array( 'name' => 'Changed' ) );
$this->assertSame( 'Protected ' . $field_id, FrmField::getOne( $field_id )->name, 'The filtered values and field ID should be used before persistence.' );

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_FrmIntegrationGuards::assertSame()


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


try {
$html = do_shortcode( '[formidable id="' . $form_id . '"]' );
$this->assertStringContainsString( 'Form context: ' . $form_id, $html, 'The final output filter should receive the form being rendered.' );

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_FrmIntegrationGuards::assertStringContainsString()


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

*/
$form = apply_filters( 'frm_filter_final_form', $form );
}
$form = apply_filters( 'frm_filter_final_form', $form, $form_object );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

Comment thread classes/models/FrmEntry.php Outdated
}
}

return (bool) apply_filters( 'frm_allow_entry_save', true, $values );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

* @param array $values Field values to save.
* @param int $id Existing field ID.
*/
$values = apply_filters( 'frm_field_values_before_update', $values, $id );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

* @return bool
*/
public static function can_destroy( $id ) {
return (bool) apply_filters( 'frm_can_destroy_field', true, $id );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

try {
$this->assertFalse( FrmEntry::create( $values ), 'The filter should block standard creation.' );
$this->assertFalse( FrmEntry::create_entry_from_xml( $values ), 'The filter should block XML creation.' );
$this->assertFalse( FrmEntry::update( $entry_id, array( 'name' => 'Changed' ) ), 'The filter should block standard updates without a form ID.' );

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_FrmIntegrationGuards::assertFalse()


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


try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );

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_FrmIntegrationGuards::assertFalse()


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

try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );
$this->assertNotFalse( FrmField::getOne( $field_id ), 'A denied deletion should preserve the field.' );

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_FrmIntegrationGuards::assertNotFalse()


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

} finally {
remove_filter( 'frm_can_destroy_field', '__return_false' );
}
$this->assertNotFalse( FrmField::destroy( $field_id ), 'Removing the filter should allow normal deletion.' );

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_FrmIntegrationGuards::assertNotFalse()


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


try {
FrmField::update( $field_id, array( 'name' => 'Changed' ) );
$this->assertSame( 'Protected ' . $field_id, FrmField::getOne( $field_id )->name, 'The filtered values and field ID should be used before persistence.' );

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_FrmIntegrationGuards::assertSame()


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


try {
$html = do_shortcode( '[formidable id="' . $form_id . '"]' );
$this->assertStringContainsString( 'Form context: ' . $form_id, $html, 'The final output filter should receive the form being rendered.' );

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_FrmIntegrationGuards::assertStringContainsString()


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

try {
$this->assertFalse( FrmEntry::create( $values ), 'The filter should block standard creation.' );
$this->assertFalse( FrmEntry::create_entry_from_xml( $values ), 'The filter should block XML creation.' );
$this->assertFalse( FrmEntry::update( $entry_id, array( 'name' => 'Changed' ) ), 'The filter should block standard updates without a form ID.' );

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_FrmIntegrationGuards::assertFalse()


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

$this->assertFalse( FrmEntry::create( $values ), 'The filter should block standard creation.' );
$this->assertFalse( FrmEntry::create_entry_from_xml( $values ), 'The filter should block XML creation.' );
$this->assertFalse( FrmEntry::update( $entry_id, array( 'name' => 'Changed' ) ), 'The filter should block standard updates without a form ID.' );
$this->assertFalse( FrmEntry::update_entry_from_xml( $entry_id, array( 'name' => 'Changed' ) ), 'The filter should block XML updates.' );

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_FrmIntegrationGuards::assertFalse()


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

$this->assertFalse( FrmEntry::create_entry_from_xml( $values ), 'The filter should block XML creation.' );
$this->assertFalse( FrmEntry::update( $entry_id, array( 'name' => 'Changed' ) ), 'The filter should block standard updates without a form ID.' );
$this->assertFalse( FrmEntry::update_entry_from_xml( $entry_id, array( 'name' => 'Changed' ) ), 'The filter should block XML updates.' );
$this->assertSame( 'Original', FrmEntry::getOne( $entry_id )->name, 'Blocked updates should preserve the existing entry.' );

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_FrmIntegrationGuards::assertSame()


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

array( 'options' => array( 'prevent_entry_storage' => 1 ) )
);
$child_id = $this->factory->form->create();
$this->assertFalse( FrmEntry::create( array( 'form_id' => $form_id ) ), 'The storage option should block writes without an integration filter.' );

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_FrmIntegrationGuards::assertFalse()


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

);
$child_id = $this->factory->form->create();
$this->assertFalse( FrmEntry::create( array( 'form_id' => $form_id ) ), 'The storage option should block writes without an integration filter.' );
$this->assertFalse( FrmEntry::create_entry_from_xml( array( 'form_id' => $form_id ) ), 'The storage option should also block imports.' );

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_FrmIntegrationGuards::assertFalse()


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


try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );

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_FrmIntegrationGuards::assertFalse()


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

try {
$this->assertFalse( FrmField::can_destroy( $field_id ), 'Integrations should be able to deny deletion.' );
$this->assertFalse( FrmField::destroy( $field_id ), 'The model should enforce the deletion filter.' );
$this->assertNotFalse( FrmField::getOne( $field_id ), 'A denied deletion should preserve the field.' );

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_FrmIntegrationGuards::assertNotFalse()


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

} finally {
remove_filter( 'frm_can_destroy_field', '__return_false' );
}
$this->assertNotFalse( FrmField::destroy( $field_id ), 'Removing the filter should allow normal deletion.' );

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_FrmIntegrationGuards::assertNotFalse()


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


try {
FrmField::update( $field_id, array( 'name' => 'Changed' ) );
$this->assertSame( 'Protected ' . $field_id, FrmField::getOne( $field_id )->name, 'The filtered values and field ID should be used before persistence.' );

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_FrmIntegrationGuards::assertSame()


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


try {
$html = do_shortcode( '[formidable id="' . $form_id . '"]' );
$this->assertStringContainsString( 'Form context: ' . $form_id, $html, 'The final output filter should receive the form being rendered.' );

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_FrmIntegrationGuards::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 Nov 4, 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 with non-blocking notes at 325c715.

Read the whole diff against current master. The model-layer guards are placed correctly: allows_save() runs before before_insert_entry_in_database() on create and before before_update_entry() on update, so a blocked write never reaches persistence or the after-create/update actions. The parent_form_id key matches what Pro actually passes for repeater child entries (FrmProEntry.php:193). frm_filter_final_form still works for one-argument callbacks, and $form_object is the same object get_form() is given.

Not run: CI skipped PHPUnit, PHPStan and PHPCS on this head, and there is no PHPUnit binary on my machine, so I did not run the 6 new tests. I read them, and php -l passes on the changed classes. I did not exercise any of it in a browser. The 1,006-test result is the author's own report.

Non-blocking notes:

  1. frm_allow_entry_save gets a different $values shape on update. The docblock says "including the form ID", but a bare FrmEntry::update( $id, array( 'name' => ... ) ) passes no form_id. Then a second call passes only array( 'form_id' => $entry->form_id ). The filter never receives the entry ID, so an integration cannot tell which entry is being updated. Consider passing $id as a third argument, or documenting the two shapes.
  2. FrmField::destroy() can now return false, but its callers ignore that. FrmFieldsController::destroy() (the AJAX delete) ends in wp_die() either way, so the builder will drop the field from the UI while the server kept it until reload. FrmFormsController.php:381 and FrmXMLHelper::delete_removed_fields() also carry on after a denied delete. This is fine for the registration use case, but it is worth a follow-up so a denied delete shows an error.
  3. allows_save() runs before the frm_pre_create_entry filter, so a callback on that filter that changes form_id is not re-checked. This is an edge case, and only worth a comment.
  4. Tests: there is no case where the filter is allowed and the entry is saved with an extra arg. There is also no test that a repeater child entry carrying parent_form_id from Pro is blocked. The parent case is covered only with a hand-built $values.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Nov 4, 2026
@Crabcyborg Crabcyborg added this to the 7.2 milestone Nov 11, 2026
…etes

frm_allow_entry_save now receives the entry ID as a third argument, 0
for new entries. Updates check one set of values that always includes
the form ID, and check the entry's original form too when it moves.

A field delete denied by frm_can_destroy_field now returns a 403 JSON
error from the AJAX handler, and the builder shows the message and
keeps the field instead of removing it from the page.

Adds tests for an allowing three argument filter, a repeater child
entry in the shape Pro builds, and the denied AJAX delete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Crabcyborg

Crabcyborg commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed Franky's notes in 6b901b5.

  1. frm_allow_entry_save values shape: the filter now gets the entry ID as a third argument (0 for new entries). Updates go through a new allows_update() check that always adds the entry's form ID when the values have none, so callbacks see one shape. The entry's original form is also checked when an update moves the entry to another form. The docblocks list both shapes.
  2. Denied field deletes: FrmFieldsController::destroy() now returns a 403 wp_send_json_error() with a message when frm_can_destroy_field denies the delete. The builder's deleteField() shows that message in the info modal and leaves the field in place. js/formidable_admin.js has the same change. The GDPR toggle in FrmFormsController and FrmXMLHelper::delete_removed_fields() still keep the field without a message. In both cases keeping the field is what the integration asked for, and neither flow has a place to show a per-field error, so I left them alone.
  3. frm_pre_create_entry not checked again: documented on allows_save(), as suggested.
  4. Tests: added test_allowing_filter_receives_entry_id_and_saves (a three-argument filter that allows the save, checks the entry ID and the added form ID on update), test_storage_option_blocks_repeater_child_entry_values (values in the exact shape FrmProEntry builds for a repeater child), and test_denied_delete_returns_error for the AJAX handler.

Tests: test_FrmFieldsAjax|test_FrmIntegrationGuards|test_FrmEntry OK (36 tests, 246 assertions). phpcs, php-cs-fixer, rector and mago are clean on the changed files. phpstan shows only the existing line 300 notice. ESLint has no new warnings.

Note on the bundle: a local webpack build reorders hundreds of unrelated modules even on unchanged source, so it does not reproduce the committed bundle. So I added the one error callback to js/formidable_admin.js by hand, matching what the build emits, and checked that the bundle parses and that the minified infoModal is in scope. The next full build will produce the same code.

* @param array $values Entry values, including the form ID.
* @param int|string $entry_id The entry being updated, or 0 when a new entry is created.
*/
return apply_filters( 'frm_allow_entry_save', true, $values, (int) $entry_id );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function apply_filters invoked with 4 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

'name' => 'Original',
)
);
$this->assertNotFalse( $entry_id, 'An allowing filter with three arguments should not block creation.' );

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_FrmIntegrationGuards::assertNotFalse()


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

)
);
$this->assertNotFalse( $entry_id, 'An allowing filter with three arguments should not block creation.' );
$this->assertSame( 0, $this->entry_save_calls[0]['entry_id'], 'New entries should pass 0 as the entry ID.' );

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_FrmIntegrationGuards::assertSame()


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

global $frm_vars;
$frm_vars['saved_entries'] = array();
$this->entry_save_calls = array();
$this->assertNotFalse( FrmEntry::update( $entry_id, array( 'name' => 'Changed' ) ), 'An allowing filter should not block updates.' );

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_FrmIntegrationGuards::assertNotFalse()


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

$frm_vars['saved_entries'] = array();
$this->entry_save_calls = array();
$this->assertNotFalse( FrmEntry::update( $entry_id, array( 'name' => 'Changed' ) ), 'An allowing filter should not block updates.' );
$this->assertSame( 'Changed', FrmEntry::getOne( $entry_id )->name, 'The update should be saved.' );

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_FrmIntegrationGuards::assertSame()


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


try {
$this->_handleAjax( 'frm_delete_field' );
} catch ( WPAjaxDieContinueException $e ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caught class WPAjaxDieContinueException not found


The Exception class you are trying to use seems to be invalid. This will result in a run time fatal error.

remove_filter( 'frm_can_destroy_field', '__return_false' );
}

$response = json_decode( $this->_last_response, true );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Access to an undefined property test_FrmFieldsAjax::$_last_response


The property you are trying to access is not defined and will cause unexpected behavior when used.

}

$response = json_decode( $this->_last_response, true );
$this->assertFalse( $response['success'], 'A denied delete should return an error.' );

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_FrmFieldsAjax::assertFalse()


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


$response = json_decode( $this->_last_response, true );
$this->assertFalse( $response['success'], 'A denied delete should return an error.' );
$this->assertNotEmpty( $response['data']['message'], 'The error should explain why.' );

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_FrmFieldsAjax::assertNotEmpty()


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

$response = json_decode( $this->_last_response, true );
$this->assertFalse( $response['success'], 'A denied delete should return an error.' );
$this->assertNotEmpty( $response['data']['message'], 'The error should explain why.' );
$this->assertNotFalse( FrmField::getOne( $field_id ), 'The field should still exist.' );

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_FrmFieldsAjax::assertNotFalse()


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 Nov 11, 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 with non-blocking notes at 6b901b5.

I read the whole diff again against current master, not just the new commit. Both notes from my last review are addressed: frm_allow_entry_save now receives the entry ID, and a denied field delete now returns an error that the builder shows. I found no blocking problem.

Tests run (head 6b901b5, local WordPress PHPUnit harness, PR checked out in place of the plugin)

  • test_FrmIntegrationGuards.php → OK, 8 tests, 30 assertions.
  • test_FrmFieldsAjax.php (including the new denied-delete test) → OK, 10 tests, 122 assertions.
  • Entry, field, XML and form test classes (--exclude-group ajax) → OK, 249 tests, 1,430 assertions.
  • Not run: a clean full-suite result. In my environment the full run reports 108 errors, the first one in test_FrmAddon (a PHPUnit SERIALIZATION_FORMAT_USE_UNSER… syntax error), and PHPUnit stops printing after it. None of them touch files this PR changes, but I can't call the full suite green. CI skipped PHPUnit, PHPCS and PHPStan on this head, and I could not run PHPCS (the Formidable sniff standard isn't installed here).

Live check (Playground preview env on this PR, form builder)

  • A test mu-plugin denied deletion of one field through frm_can_destroy_field. Deleting that field shows the modal below and the field stays in the builder. Deleting a different field still removes it.
  • Not exercised in a browser: frm_filter_final_form with the form object, XML import blocking, frm_field_values_before_update. These are covered only by the PHPUnit tests above.

Builder modal after a denied field delete

Non-blocking notes

  1. FrmFormsController.php (the line that deletes fields on form save) and FrmXMLHelper::delete_removed_fields() still ignore a false return from FrmField::destroy(), so a denied delete there is silent. Fine for the registration use case; worth a follow-up if another integration relies on it.
  2. frm_can_destroy_field now runs twice for one builder delete: once in FrmFieldsController::destroy() and again inside FrmField::destroy(). A filter callback with side effects fires twice. Using the false return of FrmField::destroy() for the error response would run it once.
  3. The new frm_allow_entry_save docblock in FrmEntry::allows_save() aligns @param types inconsistently. The repo's PHPCS may flag it; I could not run PHPCS here.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Nov 11, 2026
add_filter( 'frm_can_destroy_field', '__return_false' );

try {
$this->assertFalse( $this->run_private_method( array( 'FrmFormsController', 'toggle_field_in_form' ), array( $form_id, 'captcha', false, '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_FrmIntegrationGuards::assertFalse()


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


try {
$this->assertFalse( $this->run_private_method( array( 'FrmFormsController', 'toggle_field_in_form' ), array( $form_id, 'captcha', false, 'Captcha' ) ) );
$this->assertFalse( $this->run_private_method( array( 'FrmXMLHelper', 'delete_removed_fields' ), array( array( FrmField::getOne( $field_id ) ) ) ) );

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_FrmIntegrationGuards::assertFalse()


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

try {
$this->assertFalse( $this->run_private_method( array( 'FrmFormsController', 'toggle_field_in_form' ), array( $form_id, 'captcha', false, 'Captcha' ) ) );
$this->assertFalse( $this->run_private_method( array( 'FrmXMLHelper', 'delete_removed_fields' ), array( array( FrmField::getOne( $field_id ) ) ) ) );
$this->assertNotFalse( FrmField::getOne( $field_id ) );

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_FrmIntegrationGuards::assertNotFalse()


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

$message,
$errors
);
$this->assertContains( 'Delete denied', $errors );

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_FrmIntegrationGuards::assertContains()


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

}

$response = json_decode( $this->_last_response, true );
$this->assertSame( $before + 1, did_filter( 'frm_can_destroy_field' ), 'One delete must evaluate the policy once.' );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function did_filter not found


A function has been called, but not defined. This will result in a run time fatal error.

'field_id' => $field_id,
);

$before = did_filter( 'frm_can_destroy_field' );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function did_filter not found


A function has been called, but not defined. This will result in a run time fatal error.

}

$response = json_decode( $this->_last_response, true );
$this->assertSame( $before + 1, did_filter( 'frm_can_destroy_field' ), 'One delete must evaluate the policy once.' );

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_FrmFieldsAjax::assertSame()


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

* @return void
*/
public function test_denied_settings_and_import_deletes_report_failure() {
$this->assertTrue( $this->run_private_method( array( 'FrmXMLHelper', 'delete_removed_fields' ), array( false ) ), 'New imports have no previous fields to delete.' );

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_FrmIntegrationGuards::assertTrue()


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 Nov 11, 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 with non-blocking notes at f207a0d.

I read the whole PR against current master again, not just the new commit. The last notes are addressed: frm_can_destroy_field now runs once on an allowed delete, and denied deletes in the settings save and XML import report a warning instead of failing silently. No blocking problem.

Tests run (head f207a0d, local WordPress PHPUnit harness, PR checked out in place of the plugin, vendor copied in)

  • test_FrmIntegrationGuards.php → OK, 9 tests, 35 assertions.
  • test_FrmFieldsAjax.php → OK, 10 tests, 123 assertions.
  • Entries, fields, XML and form test files (--exclude-group ajax, one file at a time) → 43 files OK, 311 tests, 1,573 assertions; the one other file, test_FrmCaptchaSpam.php, ran 15 tests with 1 skipped and no failure.
  • Not run: a clean full-suite result (the full run has environmental errors here, first in test_FrmAddon), PHPCS (the Formidable sniff standard isn't installed here), PHPStan. CI skipped PHPUnit, PHPCS and PHPStan on this head.

Checked with throwaway tests (removed afterwards)

  • An allowed AJAX delete runs frm_can_destroy_field 1 time on the PR and 2 times with the old can_destroy() + destroy() code, so the double evaluation is fixed.
  • FrmFormsController::update_settings() with the captcha box unticked: with a deny filter the field stays and the page shows "Some fields could not be added or deleted." beside "Settings Successfully Updated"; without it the field is deleted and no warning shows.
  • The builder's denied-delete modal was checked live at the previous head (6b901b5); the JS in this head is unchanged from that, so I did not repeat the browser pass.

Non-blocking notes (details inline)

  1. The new "evaluate the policy once" assertion cannot fail on the old code (it only runs the denied path).
  2. A delete of a field that no longer exists now returns the 403 "This field cannot be deleted." error instead of succeeding quietly.
  3. The new settings/import test was inserted between test_entry_filter_blocks_standard_and_xml_writes and its docblock.

}

$response = json_decode( $this->_last_response, true );
$this->assertSame( $before + 1, did_filter( 'frm_can_destroy_field' ), 'One delete must evaluate the policy once.' );

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.

This assertion does not prove the "checks once" fix. The test denies the delete, and on the old code (! FrmField::can_destroy() then FrmField::destroy()) a denied delete already stopped after one evaluation. I swapped the old controller code in and this test still passed 10/10. The double evaluation only happened on an allowed delete (I measured 2 runs on the old code, 1 on this PR).

Suggested fix: add a second test that allows the delete, counts did_filter( 'frm_can_destroy_field' ) before and after, and asserts the difference is 1 and that FrmField::getOne( $field_id ) is false. That test fails on the old code.

$field_id = FrmAppHelper::get_post_param( 'field_id', 0, 'absint' );
FrmField::destroy( $field_id );

if ( false === FrmField::destroy( $field_id ) ) {

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.

FrmField::destroy() also returns false when the field row is already gone (if ( ! $field ) { return false; }). So deleting a field that no longer exists (a second tab, or a double click on the delete icon) now returns the 403 "This field cannot be deleted." modal, where before it returned quietly. I ran the handler with a nonexistent field ID: new code returns {"success":false,"data":{"message":"This field cannot be deleted."}}, old code returned an empty success.

This is minor and the message is wrong for that case. If you want to keep the old behaviour, check FrmField::getOne( $field_id ) first and only send the error when the field exists and can_destroy() is false. Otherwise it is fine to leave.

$this->assertContains( 'Delete denied', $errors );
}

public function test_entry_filter_blocks_standard_and_xml_writes() {

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.

test_denied_settings_and_import_deletes_report_failure() was added between the existing @return void docblock and test_entry_filter_blocks_standard_and_xml_writes(), so the new test took the docblock and this one has none. Move the new method above that docblock (and give it its own /** @return void */), or add the docblock back here. PHPCS may flag the missing one; I could not run PHPCS here.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Nov 11, 2026
'nonce' => wp_create_nonce( 'frm_ajax' ),
'field_id' => $field_id,
);
$before = did_filter( 'frm_can_destroy_field' );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function did_filter not found


A function has been called, but not defined. This will result in a run time fatal error.

$before = did_filter( 'frm_can_destroy_field' );

try {
$this->_handleAjax( 'frm_delete_field' );

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_FrmFieldsAjax::_handleAjax()


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


try {
$this->_handleAjax( 'frm_delete_field' );
} catch ( WPAjaxDieStopException $e ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caught class WPAjaxDieStopException not found


The Exception class you are trying to use seems to be invalid. This will result in a run time fatal error.

@@ -58,6 +58,65 @@ public function test_create() {
$this->assertIsObject( $field );

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_FrmFieldsAjax::assertIsObject()


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

unset( $e );
}

$this->assertSame( $before + 1, did_filter( 'frm_can_destroy_field' ), 'An allowed delete should evaluate the policy once.' );

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_FrmFieldsAjax::assertSame()


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

}

$this->assertSame( $before + 1, did_filter( 'frm_can_destroy_field' ), 'An allowed delete should evaluate the policy once.' );
$this->assertNull( FrmField::getOne( $field_id ), 'The allowed field should be deleted.' );

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_FrmFieldsAjax::assertNull()


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


$this->assertSame( $before + 1, did_filter( 'frm_can_destroy_field' ), 'An allowed delete should evaluate the policy once.' );
$this->assertNull( FrmField::getOne( $field_id ), 'The allowed field should be deleted.' );
$this->_last_response = '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Access to an undefined property test_FrmFieldsAjax::$_last_response


This issue is raised when an attempt is made to access an undefined property.
This may not have been intended, and it is advisable to give the code another look to make sure the property is defined in the scope it is used in.

$this->_last_response = '';

try {
$this->_handleAjax( 'frm_delete_field' );

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_FrmFieldsAjax::_handleAjax()


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


try {
$this->_handleAjax( 'frm_delete_field' );
} catch ( WPAjaxDieStopException $e ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caught class WPAjaxDieStopException not found


The Exception class you are trying to use seems to be invalid. This will result in a run time fatal error.

unset( $e );
}

$this->assertSame( '', $this->_last_response, 'Deleting an already missing field should succeed quietly.' );

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_FrmFieldsAjax::assertSame()


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 Nov 12, 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. The new commit f3d52639c (my Approve was at f207a0de2) fixes all three of my notes, and I found nothing new.

  • Note 2 (deleting a missing field returned 403): fixed. FrmFieldsController::destroy() now only reports "This field cannot be deleted." when the field exists and FrmField::destroy() returns false. A second delete of the same field gets a quiet wp_die().
  • Note 1 (the "policy runs once" assertion could not fail on the old code): fixed. test_allowed_delete_checks_policy_once_and_missing_delete_succeeds deletes an allowed field and asserts did_filter( 'frm_can_destroy_field' ) went up by exactly 1, then deletes it again and asserts an empty response. With FrmField::can_destroy() called ahead of destroy() it fails ("Failed asserting that 2 is identical to 1"). With the new getOne() guard removed it errors on the second delete.
  • Note 3 (docblock separated from its test): fixed. test_entry_filter_blocks_standard_and_xml_writes has its @return void docblock back.

Tests run at f3d52639c (wordpress-develop harness, PHP 8.4, PR copied in place of the plugin):

  • test_FrmFieldsAjax.php --group ajax → OK (11 tests, 128 assertions).
  • test_FrmIntegrationGuards.php → OK (9 tests, 35 assertions).
  • --filter '/^test_(FrmFieldsAjax|FrmIntegrationGuards|FrmField|FrmXML|FrmFormsController)::/' → OK (37 tests, 327 assertions).
  • php -l clean on the three changed files.

Not run: PHPCS (the Formidable ruleset won't load in this harness) and PHPStan; CI skipped PHPUnit, PHPCS and PHPStan on this head. The files not touched by this commit were not re-read this round, and code-review/security-review/simplify were not run on this 2-line source change. The builder's delete flow was not re-checked in a UI; the earlier live pass at 6b901b5a4 stands, with no JS change since.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Nov 12, 2026
Crabcyborg and others added 2 commits November 16, 2026 11:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Crabcyborg and others added 2 commits November 16, 2026 14:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@franky-the-going-merry franky-the-going-merry Bot added the franky-working Franky is actively reviewing this label Nov 16, 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 at d69c425. My Approve was at f3d5263; the head has since moved by master merges only, so this is a fresh verdict at the new head.

  • PR's own change is unchanged: the PR diff against master is the same 9 files, 461 changed lines in the 8 source and test files, line-for-line identical to the one at f3d5263. Two of the four "Merge master" commits (fad0eaa, 2f43596) had a conflict in the built js/formidable_admin.js; the other two (fe661c9, d69c425) are clean.
  • Built bundle checked: I rebuilt js/formidable_admin.js from js/src/admin/admin.js at this head with NODE_ENV=production npx webpack. The committed file matches the rebuild except for webpack's numeric module ids (they change with the build path), and the new error( xhr ) handler is present in both. Nothing else differs.
  • Nothing new found.

Tests run at d69c425 (wordpress-develop harness, PHP 8.4, PR copied in place of the plugin):

  • test_FrmFieldsAjax.php --group ajax → OK (11 tests, 128 assertions).
  • test_FrmIntegrationGuards.php → OK (9 tests, 35 assertions).
  • --filter '/^test_(FrmFieldsAjax|FrmIntegrationGuards|FrmField|FrmXML|FrmFormsController)::/' → OK (37 tests, 327 assertions).
  • php -l clean on the five changed PHP classes.

CI skipped PHPUnit, PHPCS and PHPStan on this head, so these local runs are the only execution.

Not exercised: PHPCS and PHPStan at this head, the builder's delete flow in a UI (the earlier live pass at 6b901b5a4 stands; the only JS source change since is master's), and the three review skills.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Nov 16, 2026
…orage-guards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant