Skip to content

Remove deprecated formType from Forms API test - #350

Merged
escopecz merged 1 commit into
mautic:mainfrom
TomasVotruba:tv/remove-form-type
Aug 14, 2026
Merged

Remove deprecated formType from Forms API test#350
escopecz merged 1 commit into
mautic:mainfrom
TomasVotruba:tv/remove-form-type

Conversation

@TomasVotruba

Copy link
Copy Markdown
Contributor

Description

Companion to mautic/mautic#17082, which removes the long-deprecated form type from Mautic\FormBundle\Entity\Form (deprecated since 7.1, removed in 8.0).

Once core drops the field, form:read responses no longer include formType. FormsTest still sent it in the payload and asserted it back, so it fails against 8.0:

Undefined array key "formType"
tests/Api/FormsTest.php:67

This drops formType from both test payloads.

Compatibility

Safe against older Mautic too:

  • Sending formType was already ignored on write (allow_extra_fields => true).
  • The field was optional, so omitting it changes nothing on pre-8.0 cores.
             'name'        => 'test',
-            'formType'    => 'standalone',
             'description' => 'API test',

@patrykgruszka patrykgruszka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change is correct 👍

I think we'll need to figure use the branching model and supported Mautic versions in this repo.

@escopecz escopecz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is updating just the test which will fail on Mautic 8+. No production change was made. The code will still work for all Mautic versions. The new ones will just reject the outdated payloads. So I see no problem in merging this right away. Some version strategy would be good to have though.

@escopecz
escopecz merged commit f94ee6f into mautic:main Aug 14, 2026
2 checks passed
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.

3 participants