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 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 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 commentedYay, clarity!
Comment #6
damien tournoud commentedNice!
Comment #7
dries commentedCommitted to CVS HEAD. Thanks.
Comment #8
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 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 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 commentedCommitted. Sorry!
Comment #14
damien tournoud commentedyay! for a fixed core.