8
8
namespace Magento \CloudDocker \Config \Source ;
9
9
10
10
use Illuminate \Config \Repository ;
11
- use Magento \CloudDocker \Filesystem \FileList ;
11
+ use Magento \CloudDocker \Filesystem \DirectoryList ;
12
12
use Magento \CloudDocker \Filesystem \Filesystem ;
13
13
use Symfony \Component \Yaml \Exception \ParseException ;
14
14
use Symfony \Component \Yaml \Yaml ;
19
19
class ConfigSource implements SourceInterface
20
20
{
21
21
/**
22
- * @var FileList
22
+ * @var DirectoryList
23
23
*/
24
- private $ fileList ;
24
+ private $ directoryList ;
25
25
26
26
/**
27
27
* @var Filesystem
28
28
*/
29
29
private $ filesystem ;
30
30
31
31
/**
32
- * @param FileList $fileList
32
+ * @param DirectoryList $directoryList
33
33
* @param Filesystem $filesystem
34
34
*/
35
- public function __construct (FileList $ fileList , Filesystem $ filesystem )
35
+ public function __construct (DirectoryList $ directoryList , Filesystem $ filesystem )
36
36
{
37
- $ this ->fileList = $ fileList ;
37
+ $ this ->directoryList = $ directoryList ;
38
38
$ this ->filesystem = $ filesystem ;
39
39
}
40
40
@@ -43,7 +43,12 @@ public function __construct(FileList $fileList, Filesystem $filesystem)
43
43
*/
44
44
public function read (): Repository
45
45
{
46
- $ configFile = $ this ->fileList ->getDockerConfig ();
46
+ $ configFile = $ this ->directoryList ->getMagentoRoot () . '/.magento.docker.yml ' ;
47
+
48
+ if (!$ this ->filesystem ->exists ($ configFile )) {
49
+ $ configFile = $ this ->directoryList ->getMagentoRoot () . '/.magento.docker.yaml ' ;
50
+ }
51
+
47
52
$ repository = new Repository ();
48
53
49
54
try {
0 commit comments