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.
Currently the VERSION constant is defined in system.module. This has an unfortunate effect that code (for example in a alternate cache include file) cannot determine the version of Drupal this is running. The version constant is not defined until the final phase of bootstrap, DRUPAL_BOOTSTRAP_FULL.
We should move this define to bootstrap.inc instead, so that the version of Drupal is always available from the start of the bootstrap process.
Comment | File | Size | Author |
---|---|---|---|
#13 | bootstrap_version-618938-d6-13.patch | 1.94 KB | Albert Volkman |
#12 | bootstrap_version-618938-11-d6.patch | 1.94 KB | Albert Volkman |
#1 | bootstrap-version-618938-1.patch | 1.73 KB | pwolanin |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedSeems like we should move the minimum version info, etc as well.
simple patch - just cut from system.module and paste into bootstrap.inc
Comment #2
horncologne CreditAttribution: horncologne commentedLooking good! Great idea, btw.
Comment #3
chx CreditAttribution: chx commentedThat's OK. The performance hit resulting from this code movement is likely to be negligible small. (However, APC has a speedup for defines and there is a hidef extension, too. But I think we still do not have enough defines for a hit.)
Comment #4
bjaspan CreditAttribution: bjaspan commentedI certainly approve of the idea. Is it bikeshedding to suggest that the minimum support version of individual database engines does not belong at the same level in bootstrap?
Comment #5
pwolanin CreditAttribution: pwolanin commentedWell, it seemed reasonable to me that we'd want to have that information available in DRUPAL_BOOTSTRAP_DATABASE. I guess you could make the case for moving it to database.inc instead, but keeping it together seems more sensible to me in terms of finding it in the codebase.
Comment #6
pwolanin CreditAttribution: pwolanin commentedComment #7
Dries CreditAttribution: Dries commentedCommitted.
Comment #8
pwolanin CreditAttribution: pwolanin commentedComment #9
pwolanin CreditAttribution: pwolanin commentedoops - looks like there were extra changes in the commit: http://drupal.org/cvs?commit=281932
Comment #10
Dries CreditAttribution: Dries commentedYep, that was by accident. I already updated the other issue.
Comment #11
pwolanin CreditAttribution: pwolanin commentedseems like it would make sense to do the same for 6 and 5?
Comment #12
Albert Volkman CreditAttribution: Albert Volkman commentedNot sure if there's still interest in this after 2+ years, but here's a D6 backport.
Comment #13
Albert Volkman CreditAttribution: Albert Volkman commentedRenaming patch.