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.
drupal_initialize_variables -> drupal_initialize_php
Really, this function has nothing to do with Drupal variables. It's all about PHP globals and ini things.
conf_init -> drupal_initialize_settings
This reads settings.php. Let's unify terminology by naming the function similarly.
variable_init -> variable_initialize
We're moving toward spelling out "initialize" elsewhere, so we should do so here, too.
Comment | File | Size | Author |
---|---|---|---|
#9 | 517542-fix.patch | 649 bytes | Damien Tournoud |
#4 | rename-bootstrap-functions.patch | 14.78 KB | David Strauss |
#2 | rename-bootstrap-functions.patch | 14.83 KB | David Strauss |
rename-bootstrap-functions.patch | 1.99 KB | David Strauss | |
Comments
Comment #1
Crell CreditAttribution: Crell commented+1 on concept. The second two I agree with entirely.
I'm not sure that drupal_initialize_php is the best name for the first function. It's setting defaults and configuration for both the $_SERVER super-global environment object and various php_ini() settings. So, maybe _php is the right suffix there? What about drupal_initialize_environment()? I'm not sure here either way, just bringing it up.
There's also drupal_session_initialize(). Should the name patterns match?
We should probably also fix init_theme() for the same reasons mentioned above. drupal_initialize_theme() / drupal_theme_initialize() ?
Comment #2
David StraussHere's a much-expanded patch.
Comment #3
Dries CreditAttribution: Dries commentedMuch better, IMO. Can try to commit it later today.
Comment #4
David StraussHere's an update without silly renaming of the block module theme function.
Comment #5
Crell CreditAttribution: Crell commentedYay, clarity!
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedNice!
Comment #7
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis broke everything badly, because a variable_init() call was not converted in DrupalWebTestCase:
^ Only 153 passes is a sign.
Comment #9
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #10
David StraussDoes the test bot not catch fatal errors from calling undefined functions?
Comment #11
David StraussDamZ's change should definitely go in. Not sure how I missed that one.
Comment #12
Damien Tournoud CreditAttribution: Damien Tournoud commentedSee #443154: Fatal errors in tests not reported as failures for the parent issue. I consider this a bug in PIFR, but there are some disagreement there.
Comment #13
Dries CreditAttribution: Dries commentedCommitted. Sorry!
Comment #14
Damien Tournoud CreditAttribution: Damien Tournoud commentedyay! for a fixed core.