Open klonos opened 5 years ago
I have filed a PR that adds some of these missing wrapper functions, and I have ticked them in the issue summary. I believe that this will improve our backwards compatibility layer.
Still not sure if these were missed or intentionally not included.
Any function that starts with an underscore (such as _drupal_get_filename_fallback()
) is considered to be a "private" function and can change its arguments or name at any time, because it's not supposed to be used outside of the module that provided it. For that reason, we didn't bother including backwards compatibility for those functions, because they're not intended to be used by any other code.
Other functions we should provide wrappers for if they still have analogues in Backdrop, but some of them no longer have purpose/meaning, such as registry_rebuild()
(Backdrop no longer has a database registry).
Code related to the old class registry (removed in Backdrop): _drupal_file_scan_cache() _drupal_get_filename_perform_file_scan() _drupal_get_filename_fallback_trigger_error() _drupal_trigger_error_with_delayed_logging() drupal_file_scan_write_cache() drupal_autoload_trait() _registry_check_code() registry_rebuild() registry_update()
IP Address Blacklisting (Removed in Backdrop): drupal_is_denied() drupal_block_denied()
Private functions: _drupal_set_preferred_header_name() _drupal_bootstrap_database() _drupal_bootstrap_variables() _drupal_bootstrap_page_header() _drupal_shutdown_function()
Should probably have a wrapper added:
drupal_is_https() drupal_language_types() drupal_multilingual() language_types() drupal_check_memory_limit() drupal_clear_opcode_cache()
Removing milestone, adding tag for milestone review
In order to easily get the D7 Yubikey module to fully work in BD, the drupal_is_denied function is needed. Please include it so that we can have sites that allow Yubikey-only login (no user name or password). The rest of that module seems to work as long as the deprecated "authmap" table is manually added (empty).
I've updated the Original Post with the feedback from @quicksketch to note only the functions we still need to wrap. It looks like maybe only language_types()
is missing from the PR by @klonos. We inherited that change from early Drupal 8, and the change record for it is here: https://www.drupal.org/node/1450154
drupal_is_denied()
Checks to see if an IP address has been blocked.
@LeeteqXV what should the drupal_is_denied()
/ backdrop_is_denied()
functions do in Backdrop, since there is no list of blocked IP addresses to check?
Still keen to wrap this up. I wanted to ask: should we still add deprecation wrapper functions for things like
registry_rebuild()
/registry_update()
even if it is just to call watchdog_deprecated_function()
(so to let people know what's going on and add links to change records etc.)?
@klonos I think so, yes. That will help developers find any problems with their code.
...I was looking for a respective
_backdrop_get_filename_fallback()
function inbootstrap.inc
, and a wrapper function for it indrupal.inc
, but neither exist. Any specific reasons for this?These Should probably have a wrapper added:
drupal_is_https()
drupal_language_types()
drupal_multilingual()
drupal_check_memory_limit()
drupal_clear_opcode_cache()
language_types()
N/A IP Address Blacklisting (Removed in Backdrop):
drupal_is_denied()
drupal_block_denied()
N/A Code related to the old class registry (Removed in Backdrop):
registry_rebuild()
registry_update()
_drupal_file_scan_cache()
_drupal_get_filename_perform_file_scan()
_drupal_get_filename_fallback_trigger_error()
_drupal_trigger_error_with_delayed_logging()
drupal_file_scan_write_cache()
drupal_autoload_trait()
_registry_check_code()
N/A Private functions (nothing in contrib should call these, safe to change or delete)
_drupal_get_filename_fallback()
_drupal_set_preferred_header_name()
_drupal_bootstrap_database()
_drupal_bootstrap_variables()
_drupal_bootstrap_page_header()
_drupal_shutdown_function()
PR by @klonos: https://github.com/backdrop/backdrop/pull/2383