Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We currently have our own subformstate, which is a behemoth of a class - and not a very well tested one. Drupal core 8.2 has it's own subform class and tests.
I think we should require 8.2 (it's been released) and remove our own version of the subforms and use core's instead. That'll be less code we have to maintain ourselves.
Comment | File | Size | Author |
---|---|---|---|
#21 | use_core_s_subform-2813707-21.patch | 23.5 KB | borisson_ |
Comments
Comment #2
borisson_Actionable items:
- Remove our own SubFormState class.
- Change the use statement for every time we use
new SubFormState()
to the core class.Upload a patch to see if test still pass, test locally to see if the admin forms still work.
Change the facets.info.yml to also depend on
system (>=8.2)
Comment #3
borisson_https://www.drupal.org/node/2690229#comment-11713165 is a good example of the changes that need to be done here.
Comment #4
borisson_I think this should do it.
Comment #7
borisson_I tried this again, it still doesn't work. I hoped this was going to be easier. No interdiff as this is from scratch.
Comment #10
borisson_I asked Xano for help, and he mentioned that we should trigger an error when not using subform state. So I added that. Still no idea why this is failing though. Will ask @drunken_monkey for help.
Comment #13
drunken monkeyIf the keys of the subform were
['facet_settings', $processor_id, 'settings']
, why are you now changing that to just$form['facet_settings']
? Seems to me like it should be$form['facet_settings'][$processor_id]['settings']
.Comment #14
borisson_Fixed #13, let's see how the testbot feels.
Comment #17
borisson_Looks like that didn't really help. I'll have another go at this later.
Comment #18
borisson_Comment #19
borisson_Comment #21
borisson_Comment #23
borisson_Crediting Xano
Comment #25
borisson_This is finally green! Committed. Thanks Bart!