|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* |
|
4
|
|
|
* Precise Similar Topics |
|
5
|
|
|
* |
|
6
|
|
|
* @copyright (c) 2013 Matt Friedman |
|
7
|
|
|
* @license GNU General Public License, version 2 (GPL-2.0) |
|
8
|
|
|
* |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
namespace vse\similartopics\migrations; |
|
12
|
|
|
|
|
13
|
|
|
class release_1_3_0_data extends \phpbb\db\migration\container_aware_migration |
|
|
|
|
|
|
14
|
|
|
{ |
|
15
|
|
|
public function effectively_installed() |
|
16
|
|
|
{ |
|
17
|
|
|
return isset($this->config['similar_topics_version']) && version_compare($this->config['similar_topics_version'], '1.3.0', '>='); |
|
18
|
|
|
} |
|
19
|
|
|
|
|
20
|
|
|
public static function depends_on() |
|
21
|
|
|
{ |
|
22
|
|
|
return array('\vse\similartopics\migrations\release_1_3_0_schema'); |
|
23
|
|
|
} |
|
24
|
|
|
|
|
25
|
|
|
public function update_data() |
|
26
|
|
|
{ |
|
27
|
|
|
// use module tool explicitly since module.exists does not work in 'if' |
|
28
|
|
|
$module_tool = $this->container->get('migrator.tool.module'); |
|
29
|
|
|
|
|
30
|
|
|
return array( |
|
31
|
|
|
// remove any old ACP modules, wrapped in an if blanket to prevent |
|
32
|
|
|
// these modules from being added back during extension un-installation. |
|
33
|
|
|
array('if', array( |
|
34
|
|
|
$module_tool->exists('acp', 'PST_TITLE_ACP', 'PST_TITLE', true), |
|
35
|
|
|
array('module.remove', array('acp', 'PST_TITLE_ACP', 'PST_TITLE')), |
|
36
|
|
|
)), |
|
37
|
|
|
array('if', array( |
|
38
|
|
|
$module_tool->exists('acp', 'PST_TITLE_ACP', 'PST_SETTINGS', true), |
|
39
|
|
|
array('module.remove', array('acp', 'PST_TITLE_ACP', 'PST_SETTINGS')), |
|
40
|
|
|
)), |
|
41
|
|
|
// add new ACP module |
|
42
|
|
|
array('module.add', array( |
|
43
|
|
|
'acp', 'PST_TITLE_ACP', array( |
|
44
|
|
|
'module_basename' => '\vse\similartopics\acp\similar_topics_module', |
|
45
|
|
|
'modes' => array('settings'), |
|
46
|
|
|
), |
|
47
|
|
|
)), |
|
48
|
|
|
// Update existing configs |
|
49
|
|
|
array('config.update', array('similar_topics_version', '1.3.0')), |
|
50
|
|
|
); |
|
51
|
|
|
} |
|
52
|
|
|
} |
|
53
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths