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.
Part of #1696224: Remove system_settings_form()
update_settings() uses system_settings_form() and needs to use system_config_form().
Comment | File | Size | Author |
---|---|---|---|
#21 | config-update.21.patch | 32.39 KB | n3or |
#21 | interdiff.txt | 507 bytes | n3or |
#18 | config-update.18.patch | 32.46 KB | n3or |
#18 | interdiff.txt | 1.36 KB | n3or |
#16 | config-update.16.patch | 32.46 KB | n3or |
Comments
Comment #1
n3or CreditAttribution: n3or commentedTitle.
Comment #2
n3or CreditAttribution: n3or commentedThe main update module should be fully converted now. (Upgrade path, yml-file, replacement of variable_*(), naming of configuration options ..)
I removed the constants "UPDATE_MAX_FETCH_TIME" and "UPDATE_MAX_FETCH_ATTEMPTS" (update.module). They were used as variable_get default values only. I set their numeric values as default in update.settings.yml, so they are redundant.
This patch isn`t complete! I will add "update_test_*" and "update_script_*" transformation in next patch version.
Comment #3
n3or CreditAttribution: n3or commentedForgot to add yml-file.
Comment #5
sunThe indentation for nested keys should be 4 spaces... :-/
Would it make sense to put all the fetch settings into a separate 'fetch' key on the top-level? E.g.:
Wow, I was horribly mistaken when I first saw this key and wanted to suggest to change it into 'enabled'...
Let's rename this into 'check.disabled_extensions'
I had to look up what this key means. Possible alternatives:
check.interval
check.interval_days
check.expire
check.expire_days
All not really ideal, better suggestions welcome.
This seems to be a simple array, so the empty syntax is
[]
This variable is "state", not configuration, and thus we should leave it alone.
Let's use a if/else control structure instead of the ternary operator here, so we do not need to load the config object if $project contains a URL already.
&$form_state always needs to be taken by reference.
I do not understand why this was added? Can we revert it? :)
Comment #6
n3or CreditAttribution: n3or commentedThank you!
What about something like "check.repeat_interval"?
I assumed this code from the original code. Can I remove it? I wasn't sure about that.
Comment #7
n3or CreditAttribution: n3or commentedMade changes suggested by sun and converted update_test and update_test_script.
Comment #8
n3or CreditAttribution: n3or commentedComment #9
sunUnfortunately, I overlooked this... this is also state, and/or something we need to resolve differently... let's just revert all the affected code back to variables... :-/
...
oh! This key doesn't really exist -- the code you've changed belongs to an example hook implementation in the API documentation for Update module. Let's remove the key from the config file, but keep the change to the example hook code :)
Comment #10
n3or CreditAttribution: n3or commented#9 fixed.
Comment #11
n3or CreditAttribution: n3or commented..
Comment #12
sunExcellent work. Almost done!
We need to re-introduce two variable_del()s for these two state variables. Ideally, along with a
Comment #13
n3or CreditAttribution: n3or commentedComment #14
alexpottGreat patch! Couple of minor nitpicks...
This comment needs to be re-jigged so that each line uses as much of the 80 chars as possible and it should say "Checks the 'update_test.settings:system_info' configuration and..."
As above
Comment #15
n3or CreditAttribution: n3or commented#14 done! :)
Comment #16
n3or CreditAttribution: n3or commentedRefers to #14, forgot to replace "setting" by "configuration". Interdiff refers to patch #13.
Comment #17
aspilicious CreditAttribution: aspilicious commentedtrailing whitespace
trailing whitespace
Almost every text editor/ide has options to trim trailing whitespaces on save. It makes your life easier ;)
26 days to next Drupal core point release.
Comment #18
n3or CreditAttribution: n3or commentedArgh! Thank you, found and activated this option :)
Comment #19
n3or CreditAttribution: n3or commentedComment #20
sun99.9% done! :)
Let's also remove the variable of the example hook implementation from the module update :)
Comment #21
n3or CreditAttribution: n3or commentedComment #22
n3or CreditAttribution: n3or commentedComment #23
sunAwesome!
Comment #24
Dries CreditAttribution: Dries commentedCommitted to 8.x, including the .yml file. Win! :-)
Thanks everyone.