File tree Expand file tree Collapse file tree 5 files changed +52
-11
lines changed Expand file tree Collapse file tree 5 files changed +52
-11
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Vaimo \WebDriverBinaryDownloader \Analysers ;
7
7
8
- class PlatformAnalyser
8
+ class PlatformAnalyser implements \ Vaimo \ WebDriverBinaryDownloader \ Interfaces \PlatformAnalyserInterface
9
9
{
10
- const TYPE_LINUX32 = 'linux32 ' ;
11
- const TYPE_LINUX64 = 'linux64 ' ;
12
- const TYPE_WIN32 = 'win32 ' ;
13
- const TYPE_WIN64 = 'win64 ' ;
14
- const TYPE_MAC64 = 'mac64 ' ;
15
-
16
10
public function getPlatformCode ()
17
11
{
18
12
if (stripos (PHP_OS , 'win ' ) === 0 ) {
Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Vaimo \WebDriverBinaryDownloader ;
7
7
8
- class Installer
8
+ use Vaimo \WebDriverBinaryDownloader \Interfaces \ConfigInterface ;
9
+
10
+ class Installer implements \Vaimo \WebDriverBinaryDownloader \Interfaces \InstallerInterface
9
11
{
10
12
/**
11
13
* @var \Composer\Composer
@@ -36,7 +38,7 @@ public function __construct(
36
38
$ this ->utils = new \Vaimo \WebDriverBinaryDownloader \Installer \Utils ();
37
39
}
38
40
39
- public function executeWithConfig (\ Vaimo \ WebDriverBinaryDownloader \ Interfaces \ ConfigInterface $ pluginConfig )
41
+ public function executeWithConfig (ConfigInterface $ pluginConfig )
40
42
{
41
43
$ binaryDir = $ this ->composerRuntime ->getConfig ()->get ('bin-dir ' );
42
44
@@ -78,7 +80,7 @@ public function executeWithConfig(\Vaimo\WebDriverBinaryDownloader\Interfaces\Co
78
80
79
81
$ pluginPackage = $ projectAnalyser ->resolvePackageForNamespace (
80
82
$ localRepository ->getCanonicalPackages (),
81
- __NAMESPACE__
83
+ get_class ( $ pluginConfig )
82
84
);
83
85
84
86
$ downloadManager = new \Vaimo \WebDriverBinaryDownloader \Installer \DownloadManager (
Original file line number Diff line number Diff line change @@ -81,7 +81,11 @@ public function downloadRelease(array $versions)
81
81
/** @var \Composer\Downloader\DownloaderInterface $downloader */
82
82
$ downloader = $ this ->downloadManager ->getDownloaderForInstalledPackage ($ package );
83
83
84
- $ downloader ->download ($ package , $ targetDir );
84
+ /**
85
+ * Some downloaders have the option to mute the output, which is why
86
+ * there the third call argument.
87
+ */
88
+ $ downloader ->download ($ package , $ targetDir , false );
85
89
86
90
return $ package ;
87
91
} catch (\Composer \Downloader \TransportException $ exception ) {
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Vaimo Group. All rights reserved.
4
+ * See LICENSE_VAIMO.txt for license details.
5
+ */
6
+ namespace Vaimo \WebDriverBinaryDownloader \Interfaces ;
7
+
8
+ use Vaimo \WebDriverBinaryDownloader \Interfaces \ConfigInterface as Config ;
9
+
10
+ interface InstallerInterface
11
+ {
12
+ /**
13
+ * @param Config $pluginConfig
14
+ */
15
+ public function executeWithConfig (Config $ pluginConfig );
16
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Vaimo Group. All rights reserved.
4
+ * See LICENSE_VAIMO.txt for license details.
5
+ */
6
+ namespace Vaimo \WebDriverBinaryDownloader \Interfaces ;
7
+
8
+ interface PlatformAnalyserInterface
9
+ {
10
+ const TYPE_LINUX32 = 'linux32 ' ;
11
+ const TYPE_LINUX64 = 'linux64 ' ;
12
+ const TYPE_WIN32 = 'win32 ' ;
13
+ const TYPE_WIN64 = 'win64 ' ;
14
+ const TYPE_MAC64 = 'mac64 ' ;
15
+
16
+ /**
17
+ * @return string
18
+ */
19
+ public function getPlatformCode ();
20
+
21
+ /**
22
+ * @return string
23
+ */
24
+ public function getPlatformName ();
25
+ }
You can’t perform that action at this time.
0 commit comments