Migration¶
This page lists all notable changes and required migrations when upgrading to a new major version of this extension.
Version 2.0.0¶
Finisher context in event¶
EliasHaeussler\Typo3FormConsent\Event\ModifyConsentEvent
no longer explicitly provides the currentTYPO3\CMS\Form\Domain\Runtime\FormRuntime
instance via thegetFormRuntime()
method. UsegetFinisherContext()->getFormRuntime()
instead.EliasHaeussler\Typo3FormConsent\Domain\Factory\ConsentFactory::createFromForm
no longer expects aTYPO3\CMS\Form\Domain\Runtime\FormRuntime
as second parameter. Pass the currentTYPO3\CMS\Form\Domain\Finishers\FinisherContext
instead.
Version 1.0.0¶
Consent state enum¶
Different consent states moved from
EliasHaeussler\Typo3FormConsent\Type\ConsentStateType
to a newEliasHaeussler\Typo3FormConsent\Enums\ConsentState
enum.Use enum cases instead of the old class constants.
Version 0.7.0¶
Global form settings¶
Form settings for Frontend requests (
plugin.tx_form
) are no longer included globally.Make sure to add the static TypoScript setup at
EXT:form_consent/Configuration/TypoScript
to your root template.
Version 0.4.0¶
Generic consent state¶
The current state of form consents is now represented in a more generic way.
Database field
tx_formconsent_domain_model_consent.approved
was renamed totx_formconsent_domain_model_consent.state
. Upgrade wizardformConsentMigrateConsentState
needs to be executed.Database field
tx_formconsent_domain_model_consent.approval_date
was renamed totx_formconsent_domain_model_consent.update_date
. Upgrade wizardformConsentMigrateConsentState
needs to be executed. Note: The database column is now nullable.$consent->setApproved()
does no longer accept any parameters. Use$consent->setState()
instead.$consent->getApprovalDate()
was removed. Use$consent->getUpdateDate()
instead.$consent->setApprovalDate()
was removed. Use$consent->setUpdateDate()
instead.
Post-consent dismissal finishers¶
Custom finishers can now be executed after consent was dismissed.
Event listener was renamed. Change references to
EliasHaeussler\Typo3FormConsent\Event\Listener\InvokeFinishersListener
. Adapt your service configuration, if needed.Listener method was renamed. Use
onConsentApprove($event)
instead of__invoke($event)
.Event listener identifier
formConsentInvokeFinishersOnApproveListener
changed. Change references toformConsentInvokeFinishersOnConsentApproveListener
.
Version 0.3.0¶
Post-consent approval finishers¶
Custom finishers can now be executed after consent was approved.
Database field
tx_formconsent_domain_model_consent.original_request_parameters
was added. A manual migration is required. Database field should contain an JSON-encoded string of the parsed body sent with the original form submit request.Database field
tx_formconsent_domain_model_consent.original_content_element_uid
was added. A manual migration is required. Database field should contain the content element UID of the original form plugin.Post-approval finishers can now be defined as described here: Invoke finishers on consent approval or dismissal. A manual migration is required. Create form variants and configure the post-approval finishers.
Consent model¶
Form values are now represented as an instance of
EliasHaeussler\Typo3FormConsent\Type\JsonType
.Method
getDataArray()
was removed. UsegetData()->toArray()
instead.Return type of
getData()
was changed toJsonType|null
. If you need the JSON-encoded string, usejson_encode($consent->getData())
instead.Parameter
$data
ofsetData()
was changed toJsonType|null
. If you need to pass a JSON-encoded string, use$consent->setData(new JsonType($json))
instead. If you need to pass a JSON-decoded array, use$consent->setData(JsonType::fromArray($array))
instead.
Codebase¶
Minimum PHP version was raised to PHP 7.4. Upgrade your codebase to support at least PHP 7.4.
Several classes were marked as
final
. If you still need to extend or override them, consider refactoring your code or submit an issue.