Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 22
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
add_missing_config
0.00% covered (danger)
0.00%
0 / 22
0.00% covered (danger)
0.00%
0 / 2
30
0.00% covered (danger)
0.00%
0 / 1
 depends_on
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
 update_data
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
20
1<?php
2/**
3*
4* This file is part of the phpBB Forum Software package.
5*
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
7* @license GNU General Public License, version 2 (GPL-2.0)
8*
9* For full copyright and license information, please see
10* the docs/CREDITS.txt file.
11*
12*/
13
14namespace phpbb\db\migration\data\v32x;
15
16use phpbb\db\migration\migration_interface;
17use phpbb\db\migrator;
18
19class add_missing_config extends \phpbb\db\migration\container_aware_migration
20{
21    public static function depends_on()
22    {
23        return [
24            '\phpbb\db\migration\data\v32x\v329',
25        ];
26    }
27
28    public function update_data()
29    {
30        $migration_classes = [
31            '\phpbb\db\migration\data\v30x\release_3_0_3_rc1',
32            '\phpbb\db\migration\data\v30x\release_3_0_6_rc1',
33            '\phpbb\db\migration\data\v31x\add_jabber_ssl_context_config_options',
34            '\phpbb\db\migration\data\v31x\add_smtp_ssl_context_config_options',
35            '\phpbb\db\migration\data\v31x\update_hashes',
36            '\phpbb\db\migration\data\v320\font_awesome_update',
37            '\phpbb\db\migration\data\v320\text_reparser',
38            '\phpbb\db\migration\data\v32x\cookie_notice_p2',
39        ];
40
41        /** @var migrator $migrator */
42        $migrator = $this->container->get('migrator');
43
44        $update_data = [];
45
46        foreach ($migration_classes as $migration_class)
47        {
48            /** @var migration_interface $migration */
49            $migration = $migrator->get_migration($migration_class);
50
51            $migration_update_data = $migration->update_data();
52
53            foreach ($migration_update_data as $entry)
54            {
55                if ($entry[0] == 'config.add')
56                {
57                    $update_data[] = $entry;
58                }
59            }
60        }
61
62        return $update_data;
63    }
64}