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.views-entity-views-data-2846614.php
1 <?php
2
3 /**
4  * @file
5  * Contains database additions to drupal-8.bare.standard.php.gz for testing the
6  * upgrade path of https://www.drupal.org/node/2455125.
7  */
8
9 use Drupal\Core\Database\Database;
10 use Drupal\Core\Serialization\Yaml;
11
12 $connection = Database::getConnection();
13
14 // Structure of a view with timestamp fields.
15 $views_configs = [];
16
17 $views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/drupal-8.views-entity-views-data-2846614.yml'));
18
19 foreach ($views_configs as $views_config) {
20   $connection->insert('config')
21     ->fields([
22       'collection',
23       'name',
24       'data',
25     ])
26     ->values([
27       'collection' => '',
28       'name' => 'views.view.' . $views_config['id'],
29       'data' => serialize($views_config),
30     ])
31     ->execute();
32 }