Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / fixtures / update / drupal-8.views-revision-metadata-fields-2248983.php
1 <?php
2
3 /**
4  * @file
5  * Contains database additions to
6  * drupal-8.2.1.bare.standard_with_entity_test_enabled.php.gz for testing the
7  * upgrade path of https://www.drupal.org/node/2248983.
8  */
9
10 use Drupal\Core\Database\Database;
11 use Drupal\Core\Serialization\Yaml;
12
13 $connection = Database::getConnection();
14
15 // View for the entity type "entity_test_revlog".
16 $views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/views.view.entity_test_revlog_for_2248983.yml'));
17
18 // View for the entity type "entity_test_mul_revlog".
19 $views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/views.view.entity_test_mul_revlog_for_2248983.yml'));
20
21
22 foreach ($views_configs as $views_config) {
23   $connection->insert('config')
24     ->fields([
25       'collection',
26       'name',
27       'data',
28     ])
29     ->values([
30       'collection' => '',
31       'name' => 'views.view.' . $views_config['id'],
32       'data' => serialize($views_config),
33     ])
34     ->execute();
35 }