Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2019 at 18:04 UTC
Updated:
18 May 2019 at 10:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
danchadwick commentedComment #3
jrockowitz commentedThanks for catching that. For reference is the related API docs for ::preCreate
I have to find the history behind the xxxElement and xxxHandle methods.
Comment #4
jrockowitz commented\Drupal\webform\Plugin\WebformElementInterface::preCreate also needs to be updated.
The ::xxxElements methods are from #2879122: Create callback for question removal.
The ::xxxHandler methods are from #2865486: Adding, deleting, updating a Handler should trigger events and I did not document any use case. The methods could trigger a CRM to create a database table based on the current webform.
Comment #5
jrockowitz commentedSo this change is going to cause a fatal error on any WebformElement of WebformHandler that extends the ::preCreate method. We need to also add a change notice.
Comment #6
danchadwick commentedI didn't know preCreate was a standard Entity method, so I guess the element should change too. The impact of the change notice will be greatly mitigated by the fact no one has noticed this until now. It's too bad signature mismatches are a fatal error now.
I confirmed #5 applies and still allows handlers to change values.
Comment #8
jrockowitz commented