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.
Follow-up to #2454439: [META] Support PHP 7
From the error on DrupalCI it looks like PHP's get_defined_functions()
is not deterministic - so we need to sort.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2600282-6.patch | 2.46 KB | dawehner |
#5 | interdiff.txt | 639 bytes | dawehner |
#5 | 2600282-5.patch | 11.99 KB | dawehner |
#2 | 2600282-2.patch | 1.83 KB | alexpott |
Comments
Comment #2
alexpottComment #3
alexpottOn PHP7
06:55:00 Drupal\system\Tests\Update\UpdatePostUpdateTest 217 passes
- yay!Comment #4
catchLooks great.
Comment #5
dawehnerWell, I had that discussion the other day and alex was not really motivated to touch the phpunit tests of this particular class.
Comment #6
dawehnerWell javascript testing is nice, but not that important.
Comment #8
xjmSo I read the method to see if this was correct and not undoing any dependency sorting or whatnot. Turns out all getAvailableUpdateFunctions() does is look for any functions named
MODULE_post_update_NAME
where MODULE is in the enabled modules and NAME is, well, like, anything. :) So there is no reason not to make this fix.It took me longer to figure this out than it should because for some reason the
post_update
bit of that is abstracted into UpdateRegistry::$updateType but only the one value is ever used. See #2538108-26: Add hook_post_update_NAME() for data value updates to reliably run after data format updates, comments 26, 31, and 34.Anyway, this seems like a sensible fix. Reminds me of #2420421: HEAD BROKEN: Fatal error: Cannot use Drupal\Component\Utility\Xss as Xss because the name is already in use in /var/lib/drupaltestbot/sites/default/files/checkout/core/modules/views/src/Plugin/views/field/Field.php on line 11.
Committed and pushed to 8.0.x. Thanks!