21
21
22
22
/**
23
23
* Command for deployment of Sample Data
24
- * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
25
24
*/
26
25
class SampleDataDeployCommand extends Command
27
26
{
@@ -35,12 +34,6 @@ class SampleDataDeployCommand extends Command
35
34
*/
36
35
private $ sampleDataDependency ;
37
36
38
- /**
39
- * @var ArrayInputFactory
40
- * @deprecated
41
- */
42
- private $ arrayInputFactory ;
43
-
44
37
/**
45
38
* @var ApplicationFactory
46
39
*/
@@ -51,6 +44,7 @@ class SampleDataDeployCommand extends Command
51
44
* @param Dependency $sampleDataDependency
52
45
* @param ArrayInputFactory $arrayInputFactory
53
46
* @param ApplicationFactory $applicationFactory
47
+ * @SuppressWarnings(PHPMD.UnusedLocalVariable)
54
48
*/
55
49
public function __construct (
56
50
Filesystem $ filesystem ,
@@ -60,7 +54,6 @@ public function __construct(
60
54
) {
61
55
$ this ->filesystem = $ filesystem ;
62
56
$ this ->sampleDataDependency = $ sampleDataDependency ;
63
- $ this ->arrayInputFactory = $ arrayInputFactory ;
64
57
$ this ->applicationFactory = $ applicationFactory ;
65
58
parent ::__construct ();
66
59
}
@@ -113,6 +106,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
113
106
/**
114
107
* Create new auth.json file if it doesn't exist.
115
108
*
109
+ * We create auth.json with correct permissions instead of relying on Composer.
110
+ *
116
111
* @return void
117
112
* @throws \Exception
118
113
*/
@@ -124,7 +119,10 @@ private function createAuthFile()
124
119
try {
125
120
$ directory ->writeFile (PackagesAuth::PATH_TO_AUTH_FILE , '{} ' );
126
121
} catch (\Exception $ e ) {
127
- throw new \Exception ('Error in writing Auth file. Please check permissions for writing. ' );
122
+ $ message = 'Error in writing Auth file '
123
+ . $ directory ->getAbsolutePath (PackagesAuth::PATH_TO_AUTH_FILE )
124
+ . '. Please check permissions for writing. ' ;
125
+ throw new \Exception ($ message );
128
126
}
129
127
}
130
128
}
0 commit comments