1
|
|
|
<?php |
2
|
|
|
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps |
3
|
|
|
// phpcs:disable PSR1.Files.SideEffects |
4
|
|
|
/* |
5
|
|
|
* Copyright (c) 2022 Mark C. Prins <[email protected]> |
6
|
|
|
* |
7
|
|
|
* Permission to use, copy, modify, and distribute this software for any |
8
|
|
|
* purpose with or without fee is hereby granted, provided that the above |
9
|
|
|
* copyright notice and this permission notice appear in all copies. |
10
|
|
|
* |
11
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
12
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
13
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
14
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
15
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
16
|
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
17
|
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
18
|
|
|
* |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
use Composer\InstalledVersions; |
22
|
|
|
|
23
|
|
|
require_once __DIR__ . '/vendor/autoload.php'; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* DokuWiki Plugin geophp (Action Component). |
27
|
|
|
* |
28
|
|
|
* @author Mark Prins |
29
|
|
|
*/ |
30
|
|
|
class action_plugin_geophp extends DokuWiki_Plugin { |
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* plugin should use this method to register its handlers with the DokuWiki's event controller |
33
|
|
|
* |
34
|
|
|
* @param $controller DokuWiki's event controller object. Also available as global $EVENT_HANDLER |
|
|
|
|
35
|
|
|
*/ |
36
|
|
|
final public function register(Doku_Event_Handler $controller): void { |
|
|
|
|
37
|
|
|
$controller->register_hook('PLUGIN_POPULARITY_DATA_SETUP', 'AFTER', $this, 'popularity'); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* add popularity data for this plugin. |
42
|
|
|
* |
43
|
|
|
* @param Doku_Event $event |
44
|
|
|
* the DokuWiki event |
45
|
|
|
*/ |
46
|
|
|
final public function popularity(Doku_Event $event): void { |
|
|
|
|
47
|
|
|
global $updateVersion; |
48
|
|
|
$geoPHP = InstalledVersions::getPrettyVersion('phayes/geophp'); |
49
|
|
|
$plugin_info = $this->getInfo(); |
50
|
|
|
$event->data['geophp']['version'] = $plugin_info['date']; |
51
|
|
|
$event->data['geophp']['geophp'] = $geoPHP; |
52
|
|
|
$event->data['geophp']['dwversion'] = $updateVersion; |
53
|
|
|
$event->data['geophp']['combinedversion'] = $updateVersion . '_' . $plugin_info['date'] . '_' . $geoPHP; |
54
|
|
|
} |
55
|
|
|
} |
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