Skip to content

Note formType deprecation and removal in Forms REST API reference - #623

Draft
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17082-remove-formtype
Draft

Note formType deprecation and removal in Forms REST API reference#623
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17082-remove-formtype

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open in Promptless

mautic/mautic PR #17082 removes the long-deprecated formType field from the Form entity in Mautic 8.0. The field has been deprecated since 7.1 and disappears from form:read responses in 8.0; because form types are no longer used, Mautic ignores any formType value submitted on write (this was already the case before 8.0).

The Forms REST API reference documented formType as a live field. This annotates the field's read-response and create request property tables with its deprecation-in-7.1 / removal-in-8.0 lifecycle and its ignored-on-write behavior, and drops formType from the Create Form PHP example. The field is left in place rather than deleted because the 7.2 docs branch still serves Mautic 7.x, where responses continue to include it.

File touched: docs/rest_api/forms.rst.

Trigger Events

Note that Mautic deprecated the Forms API formType field in 7.1 and
removes it in 8.0 (form types are no longer used, ignored on write),
per mautic/mautic#17082. Drops formType from the Create Form example.
Comment thread docs/rest_api/forms.rst
* - ``formType``
- string
- Type of the Form - ``standalone`` or ``campaign``
- Type of the Form - ``standalone`` or ``campaign``. Mautic deprecated this field in 7.1 and removes it from API responses in 8.0. Form types are no longer used

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirms Form::$formType deprecated since 7.1 (trigger_deprecation('mautic/mautic','7.1',...)) and removed from Form.php/API metadata (form:read group) targeting 8.0 removal; PR is open against base 8.x, head 472143e73752f26a85f9327c18e3fddb308d0207.

Source: mautic/mautic#17082

Comment thread docs/rest_api/forms.rst
* - ``formType``
- string
- Type of the Form - ``standalone`` or ``campaign``
- Type of the Form - ``standalone`` or ``campaign``. Mautic deprecated this field in 7.1 and removes it in 8.0. Because Form types are no longer used, Mautic ignores any value submitted for this field

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirms formType deprecated since 7.1, slated for removal in 8.0, and that API writes already ignore it silently because CommonApiController::createEntityForm sets 'allow_extra_fields' => true (app/bundles/ApiBundle/Controller/CommonApiController.php on 8.x) and Form.php has no setter for formType.

Source: mautic/mautic#17082

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

I noticed that some CI checks failed for this PR. I'm investigating whether the failures are caused by this suggestion. If they're unrelated or pre-existing, I'll leave this suggestion unchanged and create a separate suggestion if a standalone docs fix is needed.

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