Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / system / tests / fixtures / update / drupal-8.update-test-postupdate-enabled.php
1 <?php
2
3 /**
4  * @file
5  * Partial database to mimic the installation of the update_test_post_update
6  * module.
7  */
8
9 use Drupal\Core\Database\Database;
10
11 $connection = Database::getConnection();
12
13 // Set the schema version.
14 $connection->merge('key_value')
15   ->condition('collection', 'system.schema')
16   ->condition('name', 'update_test_postupdate')
17   ->fields([
18     'collection' => 'system.schema',
19     'name' => 'update_test_postupdate',
20     'value' => 'i:8000;',
21   ])
22   ->execute();
23
24 // Update core.extension.
25 $extensions = $connection->select('config')
26   ->fields('config', ['data'])
27   ->condition('collection', '')
28   ->condition('name', 'core.extension')
29   ->execute()
30   ->fetchField();
31 $extensions = unserialize($extensions);
32 $extensions['module']['update_test_postupdate'] = 8000;
33 $connection->update('config')
34   ->fields([
35     'data' => serialize($extensions),
36   ])
37   ->condition('collection', '')
38   ->condition('name', 'core.extension')
39   ->execute();