- Turn get_settings into a parameterless method, but accept one
parameter via func_get_arg; and mark the method as deprecated.
- Rename the existing get_settings to get_settings_for_section;
and mark the method as final.
- Rename the existing get_settings_for_section to get_settings_for_section_core.
See the comment added to get_settings for the rationale for the change.
In PHP 8 overriding a method having an optional parameter with a
method having no parameters throws an error, thus we can't use
the strategy of changing "get_settings()" to "get_settings($section='')"
without breaking existing extensions. So we do the following instead:
- Rename the existing "get_settings" to "get_settings_for_section"
- Rename the existing "get_settings_for_section" to "get_settings_for_section_core"
- Add a "get_settings" that just does "get_settings_for_section('')"
for compatibility, but mark it as deprecated.