Total Complexity | 7 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class MaintenanceProxyExtension extends Extension |
||
15 | { |
||
16 | /** |
||
17 | * Configures required environment settings for Composer's use, applies to |
||
18 | * {@link \BringYourOwnIdeas\Maintenance\Util\ComposerLoader} and is applied before ComposerLoaderExtension in |
||
19 | * bringyourownideas/silverstripe-composer-update-checker to ensure the proxy information is set before Composer |
||
20 | * is created |
||
21 | */ |
||
22 | public function onAfterBuild() |
||
27 | } |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Provide proxy options for {@link \BringYourOwnIdeas\Maintenance\Util\ApiLoader} instances to use in |
||
32 | * their Guzzle clients |
||
33 | * |
||
34 | * @param array $options |
||
35 | */ |
||
36 | public function updateClientOptions(&$options) |
||
37 | { |
||
38 | if ($proxy = $this->getCwpProxy()) { |
||
39 | $options['proxy'] = $proxy; |
||
40 | } |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Returns a formatted CWP proxy string, e.g. `tcp://proxy.cwp.govt.nz:1234` |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | protected function getCwpProxy() |
||
58 | ); |
||
59 | } |
||
61 |
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