Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
extensions_composer_2 | |
0.00% |
0 / 8 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
effectively_installed | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
update_data | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
depends_on | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
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 | |
14 | namespace phpbb\db\migration\data\v400; |
15 | |
16 | use phpbb\db\migration\migration; |
17 | |
18 | class extensions_composer_2 extends migration |
19 | { |
20 | public function effectively_installed() |
21 | { |
22 | return strpos($this->config['exts_composer_repositories'], 'https://satis.phpbb.com') !== false; |
23 | } |
24 | |
25 | public function update_data() |
26 | { |
27 | $repositories = json_decode($this->config['exts_composer_repositories'], true); |
28 | $repositories[] = 'https://satis.phpbb.com'; |
29 | $repositories = array_unique($repositories); |
30 | |
31 | return [ |
32 | ['config.update', ['exts_composer_repositories', json_encode($repositories, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)]], |
33 | ]; |
34 | } |
35 | |
36 | public static function depends_on() |
37 | { |
38 | return ['\phpbb\db\migration\data\v400\extensions_composer']; |
39 | } |
40 | } |